using System; using System.Collections.Generic; using System.Linq; namespace yukicoder { public class Program { public static void Main() { var n = int.Parse(Console.ReadLine()); var a = Console.ReadLine().Trim().Split(' ').Select(value => int.Parse(value)).Distinct().ToArray(); var m = 16384 * 2; var b = new bool[m]; b[0] = true; for(var i = 0; i < a.Length; i++) { for (var j = 0; j < m; j++) { if (b[j]) { b[j ^ a[i]] = true; } } } Console.WriteLine(b.Count(value => value)); } } }