Repeated numbers#365

Repeated numbers

1 second
128 megabytes
Easy (≈1000)

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

Example 1

Loading
Loading