a = list(map(int, input().split())) a.sort() for x in range(len(a)): if a[8] == 9: print('10') break elif a[x] != x+1: print(x+1) break