B=set(map(int,input().split())) c=set([1,2,3,4,5,6,7,8,9,10])-B c=list(c) print(c[0])