A binary string s of length N = 2
n is given. You will perform the following operation n times :
- Choose one of the operators AND (&), OR (|) or XOR (^). Suppose the current string is S = s
1s
2...s
k. Then, for all

, replace s
2i-1s
2i with the result obtained by applying the operator to s
2i-1 and s
2i. For example, if we apply XOR to {1101} we get {01}.
After n operations, the string will have length 1.
There are 3
n ways to choose the n operations in total. How many of these ways will give 1 as the only character of the final string.