The winner of the school-level informatics olympiad discovered an old document at home containing the results of a national archery championship in which his father participated. Unfortunately, the document was heavily damaged over time, making it impossible to read the participants' surnames. Only the scores achieved by each participant remained legible, listed in the order in which the participants performed.
After speaking with his father, the student learned that his father's score ends with the digit , one of the championship winners shot before his father, and his father's friend, who shot immediately after him, scored fewer points. The student wants to determine the highest possible place his father could have taken in the championship.
A participant is considered to have taken -th place if exactly (k - 1) participants scored strictly more points. All participants who shared first place are considered winners of the championship.
You are to write a program which, given the results of the championship, determines the highest place the student's father could have taken.
The first line contains an integer (3 \leq n \leq 10^5), the number of participants in the championship.
The second line contains positive integers, each not exceeding , representing the scores of the participants in the order in which they performed.
Output a single integer — the highest place the student's father could have taken. If no participant meets all the described conditions, output 0.
Example 1