b = {int(i) for i in input().split()} a = {i for i in range(1, 11)} print((a - b).pop())