Pebbles#1218

Pebbles

1 second
128 megabytes
Very easy

You're given an unlimited number of pebbles to distribute across an n \times n game board ( drawn from ), where each square on the board contains some positive point value between and , inclusive. A 6 \times 6 board might look like this:

prb1218

The player distributes pebbles across the board so that:

The goal is to maximise the number of points claimed by your placement of pebbles.

Input

Each board is expressed as a series of lines, where each line is a space-delimited series of numbers. A blank line marks the end of each board (including the last one).

Output

Print the maximum number of points one can get by optimally distributing pebbles while respecting the two rules. Each output should be printed on a single line.

Examples

Example 1

Loading
Loading