h, w = map(int, input().split())
dp = [[0] * (w+1) for _ in range(h+1)]
max_area = 0

for i in range(1, h+1):
    for j in range(1, w+1):
        if i == j:
            dp[i][j] = dp[i-1][j-1] + 1
        else:
            dp[i][j] = 1
        max_area = max(max_area, dp[i][j])

print(max_area)
