#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    
    long long n,m;
    cin>>n>>m;

    if (n%2==0 and m%2==0) cout<<2*m+(n-2)*((m/2)+1)<<endl;
    else
    {
        if (m%2==0) swap(n,m);

        if (n==1) cout<<m<<endl;
        else
        {
            long long p=(n-2)/2;
            long long np=n-2-p;

            cout<<2*m+np*((m/2)+1)+p*((m/2)+2)<<endl;
        }
    }
}