h, w = map(int, input().split())

if h>1 and w>1: 
    dp = [[0] * (w + 1) for _ in range(h + 1)]

    for i in range(h + 1):
        for j in range(w + 1):
            for ni in range(i + 1):
                for nj in range(j + 1):
                    dp[i][j] = max(dp[i][j], dp[ni][nj] + dp[i - ni][j - nj] + ni * nj)
    print(dp[h][w]+2)
else:
    dp = [[0] * (w + 1) for _ in range(h + 1)]

    for i in range(h + 1):
        for j in range(w + 1):
            for ni in range(i + 1):
                for nj in range(j + 1):
                    dp[i][j] = max(dp[i][j], dp[ni][nj] + dp[i - ni][j - nj] + ni * nj)

    print(dp[h][w])
