B = list(map(int,input().split())) print(sum(range(1,11)) - sum(B))