B = list(map(int, input().split())) for i, b in enumerate(B): if i+1!=b: print(i+1) exit() print(10)