import strutils, sequtils, math discard stdin.readline var dp = newSeqWith(32768, 0) dp[0] = 1 for a in stdin.readline.split.map(parseInt): var ndp = dp for i in 0..<32768: if dp[i] == 1: ndp[i xor a] = 1 dp = ndp dp.sum.echo