Gautam is doing a project in Artificial neural Networks. In a Neural Network architecture , It contains L layers and ith layer contains N[i] neurons. All the neurons on a particular layer are connected to all the neurons in previous layer and next layer if either of them exists.
Given L , N find the number of ways in which one can reach from starting layer to ending layer. He can start from any neuron in the starting layer and end up on any neuron on End layer.
As the output can be huge , print answer % 2.
Input:
First line of input file contains L , number of layers and next follows L lines each line containing one integer ,Integer ith line is the number of neurons in ith Layer.
Output:
Print the result
Constraints:
1<=L<=10000000 1<=N[I]<=10000000