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