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