B = list(map(int,input().split())) result = 0 for i in range(1,9+1): if i not in B: result = i print(result)