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<<14+1) dp[0] = true for _, v := range ss { next := make([]bool, 1<<14+1) for k, v2 := range dp { if v2 { next[k] = true next[k^v] = true } } dp = next } fmt.Println(len(dp)) } func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i }