a = set(i+1 for i in range(10))-set(map(int,input().split())) print(list(a)[0])