LUNA
문제
There are M cars on a ride in an amusement park, numbered 1 to M, and N children are waiting in a queue to enter them.
Each car has its ride duration (maximum 30 minutes) and can host only one child at a time. Once a car is empty, the next child in queue enters it. If two cars are empty at the same time, the child enters the one having a smaller number.
Write a program that will calculate number of the car the last child in queue will enter.
입력
The first line of the input file contains two integers N and M separated by a whitespace. N is the number of children in queue and M is number of cars on a ride, 1 ≤ N ≤ 2,000,000,000; 1 ≤ M ≤ 10000.
The next line consists of M integers separated by whitespaces. These integers represent durations of rides for each of M cars given in minutes. Each of these numbers will be not less than 1 and not greater than 30.
출력
The first and the only line of the output file should contain the number of the car as defined above.
예제
예제 1
3 5 7 8 9 7 8
3
예제 2
7 2 3 2
2
예제 3
22 5 1 2 3 4 5
4