#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n,m;
    cin >> n >> m;
    ll x=max(0ll,n-2);
    ll y=max(m-2,0ll);
    cout << n*m-(x*y+1)/2;
    return 0;
}