#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long n, m, res;
    cin >> n >> m;
    
    res = n * m - ((n - 2) * (m - 2) + 1) / 2;
    
    if(n == 1 && m == 1)
        cout << "1";
    else if(n == 1)
        cout << m;
    else if(m == 1)
        cout << n;
    else
        cout << res;

    return 0;
}