acm International Collegiate Programming Contest

Links

A B C D E F G H

Problem A

Which Team Should Receive the Sponsor Prize?

In ICQC (International Collegiate Quiz Contest), participating teams compete the speed of answering a difficult quiz. The winner is, of course, the team that gives the correct answer first. In addition to this, in the contest this year, a sponsor prize will be provided to the team with the time of giving the correct answer closest to 2023 seconds after the start of the contest.

Given the list of elapsed times from the start of the contest before giving the correct answer for all the participating teams, decide which team is to be provided the sponsor prize.

Input

The input consists of multiple datasets, each in the following format. The number of datasets does not exceed 50.

n
a1 a2an

The integer n is the number of participating teams within the range between 2 and 100, inclusive. The teams are numbered 1 through n. ak (k = 1, …, n) is a positive integer not exceeding 104. It represents the elapsed time in seconds before the correct answer was given by the team numbered k. You may assume that one unique team has the elapsed time before answering correctly closest to 2023 seconds.

The end of the input is indicated by a line consisting of a zero.

Output

For each dataset, output in a line the team number of the team to be provided the sponsor prize.

Sample Input

2
123 4567
3
2024 2020 2023
5
2020 2020 2021 2024 2026
3
1599 2222 1599
8
2 2 3 3 4 4 5 1
4
7777 6666 8888 9999
0

Output for the Sample Input

1
3
4
2
7
2
(End of Problem A) A B C D E F G H