#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
using ll = long long;
const int INF = 0x3f3f3f3f;
using pii = pair<int, int>;
using vi = vector<int>;
const int MOD = 1e9 + 7;
const bool debug = 0;
int n, m;
int solve() {
  if (n > m) swap(n, m);
  if (n == 1) return m;
  if (n == 2) {
    return m / 4 * 4 + 2 * min((m % 4), 2);
  }
  return n * m - (n * m / 2);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  while (cin >> n >> m) {
    cout << solve() << endl;
  }
  return 0;
}
