nums=list(map(int,input().split())) for i in range(10): if i<9: if nums[i]!=i+1: print(i+1) break if i>=9: print(10)