#region Header #!/usr/bin/env python3 # from typing import * import sys import io import math import collections import decimal import itertools from queue import PriorityQueue import bisect import heapq def input(): return sys.stdin.readline()[:-1] sys.setrecursionlimit(1000000) #endregion # _INPUT = """# paste here... # """ # sys.stdin = io.StringIO(_INPUT) def main(): N = int(input()) A = list(map(int, input().split())) S = set([0]) for i in range(N): for s in list(S): S.add(s ^ A[i]) print(len(S)) if __name__ == '__main__': main()