#include <bits/stdc++.h>
using namespace std;
long long n, m, k, i, j, res;
int main() {
  cin >> n >> m;
  if (n == 1 || m == 1) {
    cout << n * m << endl;
    return 0;
  }
  if (n == 2) {
    k = m;
    if (k % 4 == 0) {
      cout << k << endl;
    } else if (k % 4 == 1 || k % 4 == 3) {
      cout << k + 1 << endl;
    } else if (k % 4 == 2) {
      cout << k + 2 << endl;
    }
    return 0;
  }
  if (m == 2) {
    k = n;
    if (k % 4 == 0) {
      cout << k << endl;
    } else if (k % 4 == 1 || k % 4 == 3) {
      cout << k + 1 << endl;
    } else if (k % 4 == 2) {
      cout << k + 2 << endl;
    }
    return 0;
  }
  res = (n * m + 1) / 2;
  cout << res;
}
