inp = input() def findMissingNo(s): ls = list(map(int, s.split())) if ls[-1] == 9: return 10 for i,b in enumerate(ls,1): if i != b: return i print(findMissingNo(inp))