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