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


using namespace std;

void solve() {
    ll n, m;
    ll ans;
    cin >> n >> m;
    if (n < 2 || m < 2) {
        ans = m*n;
        cout << ans;
        return;
    }
    ans = n*m - (((m-2)*(n-2) + 1) / 2);
    cout << ans;
}


int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    solve();
    return 0;
}