You will be given a two-dimensional array with row consisting values 0 or 1.  
A move consists of choosing any column or row, and toggling all the 0’s as 1’s and 1’s as 0’s.  
After making the required moves, every row represents a binary number and the score of the matrix will be sum of all the numbers represented as binary numbers in each row.  
Find the highest possible score.  
$Example:$ 
Input:
0 0 1 1
1 0 1 0
1 1 0 0  
Output:
39
Explanation:
Toggled to
1 1 1 1
1 0 0 1
1 1 1 1  
0b1111 + 0b1001 + 0b1111 = 15 + 9 + 15 = 39
-----Input:-----
- First line will contains $m$, $n$ for the size of the 2-D array. 
- Contains $m$ lines of $n$ space-separated values each. 
-----Output:-----
Single integer which is the maximum score obtained by the sum of binary numbers.
-----Constraints-----
- $1 \leq m, n \leq 20$
- $A[i][j] = 1$ or $0$ 
-----Sample Input:-----
3 4  
0 0 1 1  
1 0 1 0  
1 1 0 0  
-----Sample Output:-----
39
m, n = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(m)]

m, n = len(A), len(A[0])
for i in range(m):
    if A[i][0] == 0:
        for j in range(n): A[i][j] ^= 1

for j in range(n):
    cnt = sum(A[i][j] for i in range(m))
    if cnt < m - cnt:
        for i in range(m): A[i][j] ^= 1

print(sum(int("".join(map(str, A[i])), 2) for i in range(m)))
m, n = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(m)]

m, n = len(A), len(A[0])
for i in range(m):
    if A[i][0] == 0:
        for j in range(n): A[i][j] ^= 1

for j in range(n):
    cnt = sum(A[i][j] for i in range(m))
    if cnt < m - cnt:
        for i in range(m): A[i][j] ^= 1

print(sum(int("".join(map(str, A[i])), 2) for i in range(m)))