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