#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  if (n == 1 || m == 1) {
    cout << n * m;
    return 0;
  }
  int hi = (n * m) / 2;
  if ((n * m) % 2) hi++;
  if (n == 2 || m == 2) {
    int l = n * m;
    int u = l / 8;
    u *= 4;
    u += min(l % 8, 4);
    cout << u;
    return 0;
  }
  cout << hi;
  return 0;
}
