CPython lite logoProblemsContests

2104. Timosh and Marathon

Timosh loves running and one day organized a race with his friends. Timosh has 3 friends, with whom he completed the race, and you are given the results - 4 numbers. Timosh dislikes being overtaken and does his best to win, but it may not always be possible. You are given the results of Timosh and his friends, determine how many friends performed better than Timosh.


Input

4 lines are given numbers: the result of Timosh and the results of his 3 friends. All values will not exceed 1000.

Output

Output the solution on a single line.


Sample input 1

1
2
3
4

Sample output 1

0

Sample input 2

4
3
2
1

Sample output 2

3

Sample input 3

1
1
1
1

Sample output 3

0

Sample input 4

2
1
1
4

Sample output 4

2

Login to be able to submit.