«Castle» – castle.#9396

«Castle» – castle.

1 second
64 megabytes
Hard

The ancient castle is shaped like a rectangle and contains at least two rooms. The castle's floor can be divided into a grid of M \times N cells. Each cell is marked with either a «» or a «», representing empty spaces and walls, respectively.

Develop a program named castle that determines the area of the largest possible room that can be created by removing one internal wall, which means changing a single «» to a «». Note that removing external walls is not allowed.

Input

The castle's layout is provided as a series of numbers, with each number representing a cell. The first line contains two integers and , indicating the number of rows and columns (3 \le M \le 1000, 3 \le N \le 1000). The following lines each contain consecutive zeros or ones (without spaces). The outermost rows and columns are the castle's external walls and consist entirely of ones.

Output

Print a single number, which is the area of the largest room that can be formed by removing one internal wall.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading