SP23536 FRONT - Front

Description

Little Petar is playing a strategic warfare game against his opponent, Little Nikolaj. In the game, two players compete for supremacy over the opponent's base. The bases are located at the opposite ends of the map (Nikolaj's in the lower left corner of the map, Petar's in the upper right corner) and may be attacked or defended with the use of soldiers (that are at any time located at a given (x, y) coordinate pair on the map). Petar has looked at Nikolaj's screen at a critical moment and successfully noted down all the positions where Nikolaj placed his soldiers, **sorted in ascending order by the x coordinate**. In order to plan an efficient attack, Petar is now interested in knowing how many of Nikolaj's soldiers are most vulnerable (i.e. located on the "frontline"). A soldier V(x, y) is **located on the frontline** if there is no other soldier V'(x', y') such that x

Input Format

The first line of the standard input contains a natural number N, representing the number of Nikolaj's soldiers. Each of the following N lines contains two integers x $ _{i} $ and y $ _{i} $ , representing the coordinates of Nikolaj's i-th soldier. The soldiers will be sorted ascending by their x coordinate.

Output Format

Write to the standard output a single line containing the integer F, the number of Nikolaj's soldiers located on the frontline.