A telescope schedules n observation intervals, each a half-open range [start, end). At any instant, some number of intervals are active (the instant lies inside them). Given a threshold k, report the total length of the timeline where at least k intervals are active simultaneously.
Input format
Line 1: two integers n and k.
Next n lines: two integers start and end describing one interval (start < end).
Output format
A single integer: the total length of timeline covered by at least k overlapping intervals.
Constraints
- 1 ≤ n ≤ 100000
- 1 ≤ k ≤ n
- 0 ≤ start < end ≤ 1000000000