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