프로그램 명: coci_f7
제한시간: 1 초

[요약] 포뮬러 7 결승일이 다가왔다.

전 날까지의 점수를 알 때 결승전을 치른 후 우승 가능성 있는 선수 수를 구하는게 문제이다.

5 명이 경기를 한다면 우승자에게는 5 점 , 다음은 4 점 , ... 1 점 순으로 점수가 주어지고 동시에 결승선을 들어오는 경우는 없고 참피언은 여럿 일수 있다.


The fictional World Championship of Formula 7 Drivers 2012 was characterized by exciting races and frequent shifts of driver positions on the leaderboard. Antun has missed most of it because he was training for olympiads in informatics. Now his only consolation are his medals and being the main character in this task. He has a simple question for you COCI contestants: ?How many drivers participating in this Championship still had a chance to become Formula 7 World Champion at the start of the final race?” The World Champion is, of course, the driver with the largest point total at the end (after the final race).

There are N drivers participating in the Championship. They are all assigned points after each race, including the final one. The winner of the race is awarded N points, the runner-up gets N - 1 points, and so on until the last driver, who gets 1 point. Two drivers cannot finish a race in the same spot. Write a program to calculate, based on the total number of points that each driver has earned before the final race, how many drivers still have a chance to have the largest total after the final race and thus win the Championship. If more than one driver has the same maximum point total, they are all awarded the World Champion title.

입력

출력

The first and only line of output should contain the requested number of drivers that can still win.

입출력 예

input

3
8
10
9

output

3

input

5
15
14
15
12
14

output

4
출처:coci/2012-2013/contest1 2/6

[질/답] [제출 현황] [푼 후(0)]
[ 채 점 ] [홈으로]  [뒤 로]