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