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