Problem1577--the latest stone game

1577: the latest stone game

[Creator : ]
Time Limit : 1 sec  Memory Limit : 128 MB

Description

sml had taken the stone for two years, and finally understood the true meaning of the stone game.So No. 1023 bigwigs do not think that sml is so excellent.He wanted to make difficult to sml.Now sml had a Checkerboard.And all of lattices have a numbers. If sml had magic to make a number to the smaller one between the largest number in a row and  in the largest number of columns.How much is the sum of the numbers on the chessboard now compared to the sum of the original chessboard numbers?

Input

Chessboard row number N is same as the col number.

the numbers in every lattices.

Multiple data read in

Output

the difeerence

Sample Input Copy

2
1 2
3 4

Sample Output Copy

1

Source/Category