#include <bits/stdc++.h>
#define ull unsigned long long

using namespace std;

int main() {

    int n,m;
    scanf("%d%d",&n,&m);

    ull sol;
    int b1 = (n-2)/2;
    int r1 = (m-2)/2;
    int b2 = (m-2)/2 + (m-2)%2;
    int r2 = (n-2)/2 + (n-2)%2;

    sol = n*m - b1*r1 - b2*r2;
    printf("%llu\n",sol);


}