Animesh has empty candy jars, numbered from to , with infinite capacity. He performs operations. Each operation is described by integers, , , and . Here, and are indices of the jars, and is the number of candies to be added inside each jar whose index lies between and (both inclusive).
Can you tell the average number of candies after operations?
The first line contains two integers, and , separated by a single space.
lines follow; each of them contains three integers, , , and , separated by spaces.
A single line containing the average number of candies across jars, rounded down to the nearest integer.
Note: Rounded down means finding the greatest integer which is less than or equal to the given number. E.g. 13.65 and 13.23 are rounded down to 13, while 12.98 is rounded down to 12.