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