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