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