package main import ( "bufio" "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func main() { sc.Split(bufio.ScanWords) n := nextInt() ss := make([]int, n) for i := range ss { ss[i] = nextInt() } dp := make([]bool, 1<<15+1) dp[0] = true for _, v := range ss { next := make([]bool, 1<<15+1) for k, v2 := range dp { if v2 { next[k] = true next[k^v] = true } } dp = next } sum := 0 for _, v := range dp { if v { sum++ } } fmt.Println(sum) } func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i }