A student is given n candidate study slots. Slot i runs from start_i to end_i (a half-open time range: it occupies the room from start_i up to, but not including, end_i). The student may attend any set of slots that do not overlap in time. Two slots that merely touch (one ends exactly when the other begins) do NOT conflict and may both be attended.
Print the maximum number of slots the student can attend.
Input format
Line 1: an integer n.
Next n lines: two integers start_i end_i describing slot i.
Output format
A single integer: the maximum number of mutually non-overlapping slots that can be attended.
Constraints
- 1 <= n <= 16
- 0 <= start_i < end_i <= 1000