#include <stdio.h>
#include <stdlib.h>

int main()
{
    unsigned long long n, m, p;

    scanf("%llu%llu", &n, &m);

    p = 2 * (n - 1) + 2 * (m - 1);

    printf("%llu", p + (n * m - p) / 2);
    
    return 0;
}