{"raw_statement":[{"iden":"problem statement","content":"The _beauty_ of a sequence $a$ of length $n$ is defined as $a_1 \\oplus \\cdots \\oplus a_n$, where $\\oplus$ denotes the bitwise exclusive or (XOR).\nYou are given a sequence $A$ of length $N$. Snuke will insert zero or more partitions in $A$ to divide it into some number of non-empty contiguous subsequences.\nThere are $2^{N-1}$ possible ways to insert partitions. How many of them divide $A$ into sequences whose beauties are all equal? Find this count modulo $10^{9}+7$."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq N \\leq 5 \\times 10^5$\n*   $0 \\leq A_i < 2^{20}$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\ldots$ $A_{N}$"},{"iden":"sample input 1","content":"3\n1 2 3"},{"iden":"sample output 1","content":"3\n\nFour ways of dividing $A$ shown below satisfy the condition. The condition is not satisfied only if $A$ is divided into $(1),(2),(3)$.\n\n*   $(1,2,3)$\n*   $(1),(2,3)$\n*   $(1,2),(3)$"},{"iden":"sample input 2","content":"3\n1 2 2"},{"iden":"sample output 2","content":"1"},{"iden":"sample input 3","content":"32\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"},{"iden":"sample output 3","content":"147483634\n\nFind the count modulo $10^{9}+7$."},{"iden":"sample input 4","content":"24\n1 2 5 3 3 6 1 1 8 8 0 3 3 4 6 6 4 0 7 2 5 4 6 2"},{"iden":"sample output 4","content":"292"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}