#include <iostream>
using namespace std;

int main()
{
    cin.tie(0);
    cout.tie(0);
    ios_base::sync_with_stdio(0);
    int n, m, novak, movak;
    cin >> n >> m;
    if (n == 1) cout << (m + 1) / 2;
    else if (m == 1) cout << (n + 1) / 2;
    else cout << 2 * n + 2 * m - 4 + (m / 2 - 1) * (n / 2 - 1) * 2 + (n - 2) % 2 * (n / 2 - 1) + (m - 2) % 2 * (m / 2 - 1);
}