#include <bits/stdc++.h>
using namespace std;
const int MaxN = int(2e5);
const long double pi = 3.1415926535897932384626433832795;
int main() {
  int n, m;
  while (cin >> n >> m) {
    if (m < 2 || n < 2 || (m == 2 && n == 2))
      cout << n * m << '\n';
    else if (min(n, m) == 2 && max(n, m) > 2) {
      int ans = max(n, m) / 4 * 4;
      if (max(n, m) % 4 >= 2) ans += 4;
      if (max(n, m) % 4 == 1) ans += 2;
      cout << ans << '\n';
    } else
      cout << (n * m + 1) / 2 << '\n';
  }
  return 0;
}
