b = list(map(int,input().split())) a = list(x for x in range(1,11)) for i in a: if i != b[i-1]: print(i) break else: continue