#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m;
  cin >> n >> m;
  if (n < 3 && m < 3) {
    cout << n * m;
    return;
  } else if (n == 1 || m == 1) {
    cout << n * m;
    return;
  } else if (n == 2 || m == 2) {
    if (n < m) swap(n, m);
    cout << 2 * (n / 4 * 2 + min(n % 4, 2ll));
    return;
  }
  cout << ceil((n * m) / 2.0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
