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