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