#include <bits/stdc++.h>
using namespace std;
long long n, m, ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  if (n == 2 || m == 2) {
    if (m > 2) swap(n, m);
    long long k = 4 * ((long long)(n / 2) / 2);
    if (n % 2 == 1 && (long long)(n / 2) % 2 == 1) k += 2;
    return cout << n * m - k, 0;
  }
  cout << max(
      ans, max((long long)ceil((long double)n / 3) * m,
               max((long long)ceil((long double)m / 3) * n,
                   (n % 2 == 0 || m % 2 == 0) ? n * m / 2 : (n * m + 1) / 2)));
  return 0;
}
