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