import sys

l=input().split()
for i in l:
    if int(i)==1:
        print (l.index(i)+1)