Coco runs a factory that produces rectangular chocolates of size $R \times C$. The chocolate is divided into $1 \times 1$ unit chocolates, and the flavor of each unit chocolate can be represented by a single integer $t$.
According to recent research, the total flavor of the chocolate is the sum of the XOR results of all unit chocolates belonging to every possible polyomino (a shape formed by connecting multiple unit chocolates edge-to-edge) that can be obtained by cutting the chocolate. Coco is curious about the total flavor score of the chocolates produced in her factory. Let's help Coco solve her curiosity.
Input
The first line contains the values of $R$ and $C$. ($1 \le R \times C \le 29$)
The next $R$ lines contain the flavor values of each unit chocolate. The $j$-th number in the $i$-th line represents the flavor of the unit chocolate located at the $i$-th row from the top and the $j$-th column from the left. The flavor of a unit chocolate is between $1$ and $10^6$ inclusive.
Output
Output the total flavor value of the given chocolate on a single line.
Examples
Input 1
1 4 1 2 4 8
Output 1
72
Input 2
2 3 1 1 1 1 1 1
Output 2
22
Note
The XOR of two non-negative integers $a$ and $b$ is written as $a \oplus b$, and its definition is as follows:
- When $a$ and $b$ are represented in binary with the same length, the $i$-th digit of the binary representation of $a \oplus b$ is $0$ if the $i$-th digits of $a$ and $b$ are the same, and $1$ if they are different. If the lengths of the binary representations differ, leading zeros are added to the shorter one until they are equal before performing the calculation.
In programming languages such as C, C++, and Python, the XOR of $a$ and $b$ is represented as a ^ b.
The XOR of multiple non-negative integers $a_1, a_2, \cdots, a_n$ is the result of calculating the XOR sequentially from the beginning, i.e., $((a_1 \oplus a_2) \oplus \cdots) \oplus a_n$.