#include <bits/stdc++.h>
using namespace std;
int modulo(int a, int b, int c) {
  long long x = 1, y = a;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x * y) % c;
    }
    y = (y * y) % c;
    b /= 2;
  }
  return x % c;
}
long long modulo(long long a, long long b, long long c) {
  long long x = 0, y = a % c;
  while (b > 0) {
    if (b % 2 == 1) {
      x = (x + y) % c;
    }
    y = (y * 2) % c;
    b /= 2;
  }
  return x % c;
}
int main() {
  int m, n;
  cin >> m >> n;
  if (m > n) {
    m = m + n;
    n = m - n;
    m = m - n;
  }
  int x;
  if (m == 1)
    cout << n << endl;
  else if (m == 2) {
    x = n % 4;
    if (x >= 2) x = 2;
    cout << 4 * (n / 4) + 2 * x << endl;
  } else
    cout << m * n - (m * n) / 2 << endl;
  return 0;
}
