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