#include <bits/stdc++.h>
using namespace std;
int solve(int n, int m) {
  if (n > m) {
    return solve(m, n);
  }
  if (n == 1) {
    return n * m;
  }
  if (n == 2) {
    int d = (m / 4) * 2;
    if (m % 4 != 0) {
      d += min(m % 4, 2);
    }
    return d * 2;
  }
  if (n * m % 2 == 1) {
    return (n * m) / 2 + 1;
  } else {
    return (n * m) / 2;
  }
}
inline void init() {}
int main() {
  int n, m;
  while (cin >> n >> m) {
    cout << solve(n, m) << endl;
  }
  return 0;
}
