the contestants jumped one at a time. After each jump, the scoreboard in the stadium displayed an updated list of competitors, arranged in descending order of jump height. Of several contestants with the same result, the one who reached that result earlier is ranked better.

How many contestants topped the table during the first series, even temporarily?

Input

The first line of the standard input contains a number

n, the number of contestants (1≤n≤100). The next n group of two rows contains data on the jump of one competitor. In the first of those two lines is the competitor's name (without spaces), and in the second the height of her jump, an unmarked whole number, no greater than 200.

Output

Print only one integer to the standard output, the required number of contestants who at some point (or at the end of the series) were in the first place of the results table.

Example 1

Entrance

4

Aby

115

Caroline

115

Nina

121

John

117

Output

2

Explanation

The list was led by only Aby and Nina, so two contestants.