#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main()
{
    unsigned long long n,m;
    cin>>n>>m;
    if(n==1){
            cout<<m/2+1;}
    else if(m==1){
            cout<<n/2+1;}
    else cout<<2*m+2*(n-2)+(n-2)*(m-2)/2;
    return 0;
}