#include <bits/stdc++.h>
using namespace std;
const int INF = (-1u) / 2;
const long long int INF2 = (-1ull) / 2;
int a, b, i, d[1011000], j, k, n, m, timer = 0, l, r, x, y;
int c[1011000], cnt = 0, fl = 0, a2, a3 = -1000000, ans = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1) {
    cout << m << endl;
  } else if (n == 2) {
    cout << 2 * (2 * (m / 4) + min(m % 4, 2)) << endl;
  } else {
    cout << (n * m + 1) / 2 << endl;
  }
  return 0;
}
