#include <bits/stdc++.h>
const double eps = (1e-10);
using namespace std;
int dcmp(double a, double b) {
  return fabs(a - b) <= eps ? 0 : (a > b) ? 1 : -1;
}
long long getBit(long long num, int idx) { return ((num >> idx) & 1ll) == 1ll; }
long long setBit1(long long num, int idx) { return num | (1ll << idx); }
long long setBit0(long long num, int idx) { return num & ~(1ll << idx); }
long long flipBit(long long num, int idx) { return num ^ (1ll << idx); }
int countNumBit1(long long mask) {
  int ret = 0;
  while (mask) {
    mask &= (mask - 1ll);
    ++ret;
  }
  return ret;
}
int main() {
  int n, m;
  cin >> n >> m;
  if (m < n) swap(n, m);
  if (n == 1)
    cout << m << endl;
  else if (n == 2)
    cout << 4 * (m / 4) + 2 * min(m % 4, 2) << endl;
  else
    cout << ceil((double)(m * n) / 2) << endl;
}
