## Day 11 - 2D Array

November 14, 2017

Context

Given a 2D Array, $A$:

We define an hourglass in to be a subset of values with indices falling in this pattern in ‘s graphical representation:

There are hourglasses in , and an hourglass sum is the sum of an hourglass’ values.

Calculate the hourglass sum for every hourglass in , then print the maximum hourglass sum.

Input Format

There are lines of input, where each line contains space-separated integers describing 2D Array ; every value in will be in the inclusive range of to .

Constraints

Output Format

Print the largest (maximum) hourglass sum found in .

Sample Input

Sample Output

19

Explanation

contains the following hourglasses:

The hourglass with the maximum sum () is: