h, w = map(int, input().split())
min_size = h if h < w else w
max_size = h if h > w else w
    
result = 0
for i in range(min_size, 0, -1):
    if i == 1:
        result += (max_size + 1) / 2 * max_size + max_size - 1
        continue
    result += i * max_size + (max_size + 1) / 2 * max_size + max_size - 1
    
print(int(result))
