a = list(map(int, input().split())) b = [ i for i in range(1, 10)] for i in b: if i not in a: print(i)