#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const int diri[8] = {-1, 0, 1, 0, -1, 1, 1, -1};
const int dirj[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int main() {
  int a, b;
  cin >> a >> b;
  if (a > b) swap(a, b);
  if (a == 1) {
    cout << b << endl;
    return 0;
  }
  if (a == 2) {
    cout << 4 * (b / 4) + min(4, 2 * (b % 4)) << endl;
    return 0;
  }
  cout << a * b - (a * b) / 2 << endl;
}
