def f(g): a = 1 for b in g: if a != b: return a a += 1 return a print(f(map(int,input().split())))