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