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