#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m, s = 0;
  cin >> n >> m;
  if (n < m) swap(n, m);
  if (m == 1)
    cout << n * m;
  else if (m == 2)
    cout << (n / 4) * 4 + min(4, (n % 4) * 2);
  else
    cout << n * m / 2 + (n % 2) * (m % 2);
  return 0;
}
