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