#include <bits/stdc++.h>
using namespace std;
bool mark[2005][2005];
int main() {
  long long n, m;
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1) {
    cout << m << endl;
    return 0;
  }
  if (n == 2) {
    int ans = (m / 4) * 2;
    ans += min(2LL, m % 4);
    cout << ans * 2 << endl;
    return 0;
  }
  cout << (n * m + 1) / 2 << endl;
}
