d=set('123456789')-set(input().split()) print(d.pop()if d else 10)