#include <bits/stdc++.h>
using namespace std;
int n, m, r;
int main() {
  cin >> n >> m;
  if (n > m) {
    swap(n, m);
  }
  if (n == 1) {
    r = m;
  } else if (n == 2) {
    r = m / 4 * 4;
    if (m % 4 == 0)
      ;
    else if (m % 4 == 1) {
      r += 2;
    } else {
      r += 4;
    }
    r = max(r, m);
  } else {
    r = (m * n + 1) / 2;
  }
  cout << r << endl;
  return 0;
}
