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 s = new List(); var k = (int)Math.Pow(2, a.Length)-1; while (k >= 0) { var m = 0; var j = Convert.ToString(k, 2); while (j.Length < a.Length) { j = "0" + j; } for(var i = 0; i < j.Length; i++) { if (j[i] == '1') { m ^= a[i]; } } k--; s.Add(m); } Console.WriteLine(s.Distinct().Count()); } } }