#include <bits/stdc++.h>
using namespace std;
const int INF = (1 << 30);
const long long INF64 = (1LL << 62);
const int MAXSIZE = 100000;
const double EPS = 1e-6;
int n, m;
int solve() {
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1) {
    cout << m << endl;
    return 0;
  }
  if (n == 2) {
    if (m % 2 == 0) {
      if (m % 4 == 0) {
        cout << m;
        return 0;
      } else {
        cout << (m + 2);
        return 0;
      }
    }
    if (m % 4 == 1) {
      cout << (m - 1) + 2;
      return 0;
    } else {
      cout << (m + 1);
      return 0;
    }
    return 0;
  }
  cout << (n * m + 1) / 2 << endl;
  return 0;
}
int main() {
  srand(100);
  if (!solve())
    cerr << endl << "Exit with code 0" << endl;
  else
    cerr << endl << "Error" << endl;
  return 0;
}
