package main import ( "fmt" "strings" "strconv" ) func main() { var N int fmt.Scan(&N) A := make([]int, N) for i := 0; i < N; i++ { fmt.Scan(&A[i]) } var dp = make([]bool, 1 << 15) dp[0] = true for i := 0; i < N; i++ { var nextDP = make([]bool, 1 << 15) for k := 0; k < len(dp); k++ { if dp[k] { nextDP[k] = true nextDP[k ^ A[i]] = true } } dp = nextDP } var sum = 0 for k := 0; k < len(dp); k++ { if dp[k] { sum++ } } PrintI(sum) } func PrintI(args ...int) { fmt.Println(strings.Join(mapToString(args), " ")) } func mapToString(arr []int) []string { ret := make([]string, len(arr)) for i := 0; i < len(arr); i++ { ret[i] = strconv.Itoa(arr[i]) } return ret }