using System; using System.Collections.Generic; using System.Linq; static public class Program { static public void Main() { var n = readInteger().Validate(x => 1 <= x && x <= 100000); var a = readLong(n).ValidateArray(x => 1 <= x && x <= 1L<<60); n = 32; readEOF(); var b = new List[65]; for (int i = 0; i < 65; i++) b[i] = new List(); foreach (var x in a) { var v = x; for (int i = 0; i < 64 && 0 < v; i++) { if (((v >> i) & 1) == 0) continue; if (b[i].Count > 0) v ^= b[i][0]; else { b[i].Add(v); break; } } } Console.WriteLine(1L << b.Count(x => x.Count > 0)); } static int readInteger() { var s = Console.ReadLine(); return int.Parse(s); } static long[] readLong(int n, params char[] sep) { var s = Console.ReadLine().Split(sep); if (s.Length != n) throw new Exception(string.Format("invalid input, expected{0} actual{1}", n, s.Length)); var ret = new long[n]; for (int i = 0; i < n; i++) ret[i] = long.Parse(s[i]); return ret; } static void readEOF() { if (Console.In.Peek() >= 0) throw new Exception("invalid input too long input file"); } } static public class Ex { static public T Validate(this T input, Func f) { if (!f(input)) throw new Exception("invalid input"); return input; } static public T[] ValidateArray(this T[] input, Func f) { foreach (var x in input) if (!f(x)) throw new Exception("invalid input"); return input; } }