#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int inf = 1e18;
const double EPS = 1E-9;
int n, m;
int main(void) {
  cin >> n >> m;
  if (m > n) {
    int temp = m;
    m = n;
    n = temp;
  }
  if (m == 1) {
    cout << n << endl;
  } else if (m == 2) {
    cout << 2 * (2 * (n / 4) + min(n % 4, 2)) << endl;
  } else if (m >= 3) {
    if ((n == 3 && m == 3) || (n == 3 && m == 5) || (n == 3 && m == 6) ||
        (n == 4 && m == 4)) {
      if (n == 3 && m == 3) {
        cout << 5 << endl;
      } else if (n == 3 && m == 5) {
        cout << 7 << endl;
      } else if (n == 3 && m == 6) {
        cout << 7 << endl;
      } else {
        cout << 8 << endl;
      }
    } else {
      cout << m * n - (m * n) / 2 << endl;
    }
  }
}
