#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int N = 1e6;
bool vis[N + 5];
vector<int> G[N + 5];
int xx[8] = {1, 2, 2, 1, -1, -2, -2, -1}, yy[8] = {2, 1, -1, -2, -2, -1, 1, 2};
int kumpel[N + 5];
int n, m, mm;
bool gut(int a, int b) {
  if (a > -1 && a < n && b > -1 && b < m) {
    return true;
  }
  return false;
}
int nr(int a, int b) { return a + b * n + 1; }
bool match(int v) {
  vis[v] = true;
  for (auto x : G[v]) {
    if (!vis[x] && (vis[x] = true) && (!kumpel[x] || match(kumpel[x]))) {
      kumpel[x] = v;
      kumpel[v] = x;
      return true;
    }
  }
  return false;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  bool flag = true;
  cin >> n >> m;
  for (int i = 0; i <= n - 1; i++) {
    for (int j = 0; j <= m - 1; j++) {
      for (int k = 0; k <= 7; k++) {
        if (gut(i + xx[k], j + yy[k])) {
          G[nr(i, j)].push_back(nr(i + xx[k], j + yy[k]));
        }
      }
    }
  }
  while (flag) {
    flag = false;
    for (int i = 1; i <= n * m; i++) {
      if (!vis[i] && !kumpel[i] && match(i)) {
        flag = true;
        mm++;
      }
    }
    for (int i = 1; i <= n * m; i++) {
      vis[i] = false;
    }
  }
  cout << n * m - mm << '\n';
  return 0;
}
