#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 << m * n;
  else if (n == 2 && m >= 2)
    cout << (m / 4) * 4 + min(m % 4, 2) * 2;
  else
    cout << (m * n + 1) / 2;
  return 0;
}
