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