b = list(map(int, input().split())) ans = 10 for i, e in enumerate(b, 1): if i != e: ans = i break print(ans)