AT_past20_h 温度管理

Description

$ N $ people came to use a hot spring. The $ i $ -th person will be satisfied if they bathe in a hot spring with temperature between $ L_i $ and $ R_i $ degrees, inclusive. You can prepare any number of hot springs at any temperature. However, each hot spring can have only one set temperature. At least how many hot springs do you need to prepare so that all the $ N $ people are satisfied?

Input Format

The input is given from Standard Input in the following format: > $ N $ $ L_1 $ $ R_1 $ $ L_2 $ $ R_2 $ $ \vdots $ $ L_N $ $ R_N $

Output Format

Print the minimum number of hot springs you need to prepare.

Explanation/Hint

### Sample Explanation 1 If you prepare three hot springs at $ 39 $ , $ 41 $ , and $ 45 $ degrees, everyone will be satisfied. However, you can never satisfy everyone by preparing two hot springs or less. Thus, $ 3 $ should be printed. ### Constraints - $ 1 \leq N \leq 2 \times 10^{5} $ - $ 1 \leq L_i \leq R_i \leq 10^{9} $ - All input values are integers.