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