#include <bits/stdc++.h>

using namespace std;


int main()
{
    long long n,m;

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

    if(n==1)printf("%lld", m);
    else if(m==1)printf("%lld", n);
    else printf("%lld", (n*m)/2+(n+m-2));


    return 0;
}