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