nums = {int(x) for x in input().split()} one_to_ten = {x for x in range(1,10 + 1)} ans = one_to_ten ^ nums print(ans.pop())