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