for i,j in enumerate(input().split()+[0],1): if i!=int(j):exit(print(i))