A=range(1,10+1)
B=[int(i) for i in input().split(" ")]
print([i for i in A if not any(i==n for n in B)][0])