[Source](https://www.hackerrank.com/challenges/3d-surface-area)
# Problem statement
Madison, is a little girl who is fond of toys. Her friend Mason works in a toy manufacturing factory . Mason has a 2D board ![](./Resources/Element1.svg) of size ![](./Resources/Element2.svg) with ![](./Resources/Element3.svg) rows and ![](./Resources/Element4.svg) columns. The board is divided into cells of size ![](./Resources/Element5.svg) with each cell indicated by it's coordinate ![](./Resources/Element6.svg). The cell ![](./Resources/Element6.svg)  has an integer ![](./Resources/Element7.svg) written on it. To create the toy Mason stacks ![](./Resources/Element7.svg) number of cubes of size ![](./Resources/Element8.svg) on the cell ![](./Resources/Element6.svg). 

Given the description of the board showing the values of ![](./Resources/Element7.svg) and that the price of the toy is equal to the 3d surface area find the price of the toy. 

![](./Resources/1509009918-091bdd4cba-1502631298-5cd3275ce9-img2.png)





**Input Format**


The first line contains two space-separated integers ![](./Resources/Element3.svg) and ![](./Resources/Element4.svg) the height and the width of the board respectively.

The next  ![](./Resources/Element3.svg) lines contains ![](./Resources/Element4.svg) space separated integers. The ![](./Resources/Element9.svg) integer in ![](./Resources/Element10.svg) line denotes ![](./Resources/Element7.svg).





**Constraints**



* ![](./Resources/Element11.svg)
* ![](./Resources/Element12.svg)





**Output Format**


Print the required answer, i.e the price of the toy, in one line.





**Sample Input 0**


```
1 1
1
```





**Sample Output 0**


```
6
```





**Explanation 0**


![](./Resources/1505569910-2f8fc5da13-3d.png)
The surface area of ![](./Resources/Element8.svg) cube is 6.





**Sample Input 1**


```
3 3
1 3 4
2 2 3
1 2 4
```





**Sample Output 1**


```
60
```





**Explanation 1**


The sample input corresponds to the figure described in problem statement.