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

int main()
{
    long long n, m, br, s, u;
    scanf("%lld %lld", &n, &m);
    u = (n-2)*(m-2);
    s = (n*m) - u;
    br = s + (u/2);
    printf("%lld", br);
}