n = int(input())
nums = list(map(int, input().split()))
dp = [0] * n
before = {0: -1}
before[nums[0]] = 0
dp[0] = 0 if nums[0] != 0 else 1
eor = nums[0]
for i in range(1, n):
    eor ^= nums[i]
    if eor in before:
        index = before[eor]
        if index == -1:
            dp[i] = 1
        else:
            dp[i] = dp[index] + 1
    before[eor] = i
    dp[i] = max(dp[i - 1], dp[i])
print(dp[-1])