t = list(input().split()) c = 1 for i in t: if int(i) != c: print(c) break c += 1