#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
const double EPS = 1e-10;
const double PI = acos(-1.0);
int main() {
  int n, m;
  cin >> n >> m;
  int best;
  if (n == 1) {
    best = m;
  } else if (m == 1) {
    best = n;
  } else if (n == 2) {
    if (m % 4 == 1) {
      best = m + 1;
    } else {
      best = ceil((double)m / 4) * 4;
    }
  } else if (m == 2) {
    if (n % 4 == 1) {
      best = n + 1;
    } else {
      best = ceil((double)n / 4) * 4;
    }
  } else if (m >= 3 && n >= 3) {
    best = ceil((double)n * m / 2);
  } else {
    assert(0);
  }
  cout << best;
}
