An airport runway is monitored over the time horizon from minute 0 to minute T. There are n maintenance windows, each a closed range [start, end] guaranteed to lie within [0, T]. A minute of the horizon is idle if it is not inside any maintenance window. Report the total length of the idle part of [0, T] (the length of [0, T] not covered by any window).
Input format
Line 1: two integers n and T.
Next n lines: two integers start and end describing one window (0 ≤ start ≤ end ≤ T).
Output format
A single integer: the total idle length within [0, T].
Constraints
- 1 ≤ n ≤ 100000
- 1 ≤ T ≤ 1000000000
- 0 ≤ start ≤ end ≤ T