3726 - PA2014Final Wykladzina

有一块w*s的地毯,其中有些格子是坏的。从中剪出一块面积尽可能大的子矩形,使得其中至多包含一个坏格。

Input

第一行两个整数w,s(1<=w,s<=2000)。 接下来w行,每行有s个字符,'.'表示这格是好的,'#'表示这格是坏的。

Output

输出最大面积。

Examples

Input

4 5
#.#..
....#
..#..
....#

Output

12
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题