b = [int(i) for i in input().strip().split(" ")] b.append(100) for ans, written in zip(range(1,11), b): if ans != written: print(ans) break