Farmer John's cows have taken a side job designing interesting punch-bowl designs. The designs are created as follows:
* Line 1: Two space-separated integers, W and H
* Lines 2..H+1: Line i+1 contains row i of bowl heights: W space-separated integers each of which represents the height B of a square in the bowl. The first integer is the height of column 1, the second integers is the height of column 2, and so on.
* Line 1: A single integer that is the number of cc's the described bowl will hold.
4 5 5 8 7 7 5 2 1 5 7 1 7 1 8 9 6 9 9 8 9 9
12
OUTPUT DETAILS:
Fill-up the two squares of height 1 to height 5, for 4 cc for each square. Fill the square of height 2 to height 5, for 3 cc of joice. Fill the square of height 6 to height 7 for 1 cc of juice. 2*4 + 3 + 1 = 12.