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