n = int(input()) A = list(map(int, input().split())) N = 4*10**6+50 dp = 1 limit = (1<>i)&1: ans ^= i print(ans)