eolymp
bolt
Try our new interface for solving problems
Problems

Repeated numbers

Repeated numbers

Time limit 1 second
Memory limit 128 MiB

Enter numbers from 0 to 9 in different order, one in each line. You must enter the numbers till the same number repeats itself for the first time.

####Incoming data

Each line contains one of the numbers 0, 1, 2, ..., 9.

####Output data

Displays the number of reads before the first repetition.

Examples

Input example #1
3
6
5
6
7
Output example #1
4

Note

The solution of the problem can be modeled by the behavior of "Codey Rocky", which recognizes the colors of the cards marked with numbers 0..9.