B=list(map(int,input().split())) cnt=1 for i in B: if cnt!=i: print(cnt) break cnt+=1 if cnt==10: print(10) break