import scala.io.StdIn.readLine object Main{ def ipow(x : Integer,n : Integer) : Integer= if(x == n) 1 else if(n % 2 == 0) ipow(x*x,n/2) else x * ipow(x*x,n/2) def main(args: Array[String]) = { val n = readLine().toInt val a = readLine().split(" ").map(_.toInt).sorted.distinct val dp = Array.fill(ipow(2,15))(false) dp(0) = true for(ia <- a){ for(i <- 0 until dp.length){ dp(i ^ ia) = dp(i ^ ia) || dp(i) } } println(dp.count(_ == true)) } }