#include <bits/stdc++.h>
using namespace std;
int nu, nv;
vector<int> G[1000010];
int match[1000010], dist[1000010];
bool bfs() {
  int i, u, v, len;
  queue<int> Q;
  for (i = 1; i <= nu; i++) {
    if (match[i] == 0) {
      dist[i] = 0;
      Q.push(i);
    } else
      dist[i] = 0x3f3f3f3f;
  }
  dist[0] = 0x3f3f3f3f;
  while (!Q.empty()) {
    u = Q.front();
    Q.pop();
    if (u != 0) {
      len = G[u].size();
      for (i = 0; i < len; i++) {
        v = G[u][i];
        if (dist[match[v]] == 0x3f3f3f3f) {
          dist[match[v]] = dist[u] + 1;
          Q.push(match[v]);
        }
      }
    }
  }
  return (dist[0] != 0x3f3f3f3f);
}
bool dfs(int u) {
  int i, v, len;
  if (u != 0) {
    len = G[u].size();
    for (i = 0; i < len; i++) {
      v = G[u][i];
      if (dist[match[v]] == dist[u] + 1) {
        if (dfs(match[v])) {
          match[v] = u;
          match[u] = v;
          return true;
        }
      }
    }
    dist[u] = 0x3f3f3f3f;
    return false;
  }
  return true;
}
int hopcroft_karp() {
  int matching = 0, i;
  while (bfs())
    for (i = 1; i <= nu; i++)
      if (match[i] == 0 && dfs(i)) matching++;
  return matching;
}
int id[1010][1010];
int dp[1010][1010];
int solve(int n, int m) {
  if (n <= 0 || m <= 0) return 0;
  int& ans = dp[n][m];
  if (ans != -1) return ans;
  ans = max(solve(n - 3, m) + m, solve(n, m - 3) + n);
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  ;
  int n, m;
  cin >> n >> m;
  if (n > 100 && m > 100) {
    cout << (int)(n * m / 2.0 + 0.5) << "\n";
    exit(0);
  }
  nu = 0;
  nv = 0;
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (m); ++j) {
      if ((i + j) & 1)
        id[i][j] = 1 + nu++;
      else
        id[i][j] = 1 + nv++;
    }
  for (int i = 0; i < (n); ++i)
    for (int j = 0; j < (m); ++j)
      if ((i + j) & 1) {
        for (int dx = 0; dx < (3); ++dx)
          for (int dy = 0; dy < (3); ++dy)
            if (dx * dx + dy * dy == 5) {
              for (int mx = 0; mx < (2); ++mx)
                for (int my = 0; my < (2); ++my) {
                  int nx = i + (mx ? 1 : -1) * dx;
                  int ny = j + (my ? 1 : -1) * dy;
                  if (nx >= 0 && nx < n && ny >= 0 && ny < m) {
                    int a = id[i][j];
                    int b = nu + id[nx][ny];
                    G[a].push_back(b);
                    G[b].push_back(a);
                  }
                }
            }
      }
  int maxmat = hopcroft_karp();
  cout << n * m - maxmat << endl;
  return 0;
}
