#include <bits/stdc++.h>
using namespace std;
template <class T>
T sqr(T x) {
  return x * x;
}
inline int getBit(long long x, int pos) { return ((x >> pos) & 1); }
const double eps = 1e-9;
const double pi = acos(-1.0);
const int di[8] = {-2, -2, -1, 1, 2, 2, 1, -1};
const int dj[8] = {-1, 1, 2, 2, 1, -1, -2, -2};
int n, m;
int used[7][7];
int go(int i, int j, int cnt) {
  if (j == m) {
    return go(i + 1, 0, cnt);
  }
  if (i == n) {
    return cnt;
  }
  if (used[i][j] > 0) {
    return go(i, j + 1, cnt);
  } else {
    int res = go(i, j + 1, cnt);
    for (int k = 0; k < 8; k++) {
      int ni = i + di[k];
      int nj = j + dj[k];
      if (0 <= ni && ni < n && 0 <= nj && nj < m) {
        used[ni][nj]++;
      }
    }
    res = max(res, go(i, j + 1, cnt + 1));
    for (int k = 0; k < 8; k++) {
      int ni = i + di[k];
      int nj = j + dj[k];
      if (0 <= ni && ni < n && 0 <= nj && nj < m) {
        used[ni][nj]--;
      }
    }
    return res;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  if ((m == 3 && (n == 3 || n == 5 || n == 6)) || (m == 4 && n == 4)) {
    printf("%d\n", go(0, 0, 0));
  } else {
    if (m == 1) {
      printf("%d\n", n);
    } else if (m == 2) {
      int add = 0;
      if (n % 4 == 1)
        add = 2;
      else if (n % 4 == 2) {
        add = 4;
      } else if (n % 4 == 3) {
        add = 4;
      }
      printf("%d\n", 2 * ((n / 4) * 2) + add);
    } else {
      printf("%d\n", n * m - (n * m) / 2);
    }
  }
  return 0;
}
