ns=list(map(int,input().split())) for i,n in enumerate(ns): if i+1!=n: print(i+1) break else: print(10)