U=set(range(1,11)) B=set(map(int,input().split())) print((U-B).pop())