#D12758. Angel Relief

    ID: 10612 Type: Default 1000ms 268MiB

Angel Relief

Angel Relief

K: Relief (Angel Relief)

Tenma, an angel, decides to save a city.

The city has a rectangular shape divided into north-south H H parcels x east-west W W parcels, with houses in each parcel.

The X X th section from the north and the Y Y th section from the west are represented by (X,Y) (X, Y) .

The house in parcel (i,j) (i, j) is inhabited by Ai,j A_ {i, j} people.

Tenshin chooses a rectangular area whose sides are parallel or vertical to north-south or east-west, and rescues all the people living in it one by one.

Tenshin does this for every possible rectangle.

Find the total number of times Tenma-san rescues people.

input

The integers H,W H, W are given on the first line, separated by blanks.

Of the following H H lines, the integers $ A_ {i, 1}, A_ {i, 2}, A_ {i, 3}, \ dots, A_ {i, W} $ are blank on the i i line. Given as a delimiter.

output

Output the total number of times Tenma-san rescues people.

Constraint

  • H,W H, W are integers between 1 1 and 500 500
  • Ai,j A_ {i, j} are all integers greater than or equal to 1 1 and less than or equal to 9 9 .

Input example 1

twenty two 1 2 4 8

Output example 1

60

For example, if you choose a rectangular area with (1,1) (1, 1) in the upper left and (2,2) (2, 2) in the lower right, you will rescue 15 15 people there one by one, so a total of 15 15 times. Relief.

1,2,3,4,5,8,10,12,15 1, 2, 3, 4, 5, 8, 10, 12, 15 relief for each of the 9 9 rectangular areas, for a total of 60 60 .

Input example 2

twenty three one two Three 4 5 6

Output example 2

140

Example

Input

2 2 1 2 4 8

Output

60

inputFormat

input

The integers H,W H, W are given on the first line, separated by blanks.

Of the following H H lines, the integers $ A_ {i, 1}, A_ {i, 2}, A_ {i, 3}, \ dots, A_ {i, W} $ are blank on the i i line. Given as a delimiter.

outputFormat

output

Output the total number of times Tenma-san rescues people.

Constraint

  • H,W H, W are integers between 1 1 and 500 500
  • Ai,j A_ {i, j} are all integers greater than or equal to 1 1 and less than or equal to 9 9 .

Input example 1

twenty two 1 2 4 8

Output example 1

60

For example, if you choose a rectangular area with (1,1) (1, 1) in the upper left and (2,2) (2, 2) in the lower right, you will rescue 15 15 people there one by one, so a total of 15 15 times. Relief.

1,2,3,4,5,8,10,12,15 1, 2, 3, 4, 5, 8, 10, 12, 15 relief for each of the 9 9 rectangular areas, for a total of 60 60 .

Input example 2

twenty three one two Three 4 5 6

Output example 2

140

Example

Input

2 2 1 2 4 8

Output

60

样例

2 2
1 2
4 8
60