#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5, Mod = 1e9 + 7;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n, m;
  cin >> n >> m;
  long long ans = 0;
  if (n == 2 || m == 2) {
    if (m == 2) swap(n, m);
    cout << 2 * (2 * (m / 4) + min(m % 4, 2LL));
    return 0;
  }
  cout << max(n, max(m, (n * m + 1) / 2));
  return 0;
}
