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