import sys
from functools import lru_cache

sys.setrecursionlimit(10 ** 9)


@lru_cache()
def f(h, w):
    if h < w:
        h, w = w, h
    if h == 1:
        return 1
    return h * w + f(h // 2, w) + f(h - h // 2, w)


def main():
    h, w = map(int, input().split())
    print(f(h, w))


if __name__ == "__main__":
    main()
