#include <bits/stdc++.h>
using namespace std;
int rows, cols;
std::vector<int> adj[1000006];
int dx[] = {-2, -1, +1, +2, +2, +1, -1, -2};
int dy[] = {+1, +2, +2, +1, -1, -2, -2, -1};
int left_nodes, right_nodes, match[1000006], dist[1000006];
int left_node[1000006], right_node[1000006];
bool hopcroft_karp_bfs() {
  int i, u, v, limit;
  queue<int> Q;
  for (i = 0; i < left_nodes; i++) {
    int ln = left_node[i];
    if (match[ln] == 0) {
      dist[ln] = 0;
      Q.push(ln);
    } else
      dist[ln] = (1 << 28);
  }
  dist[0] = (1 << 28);
  while (!Q.empty()) {
    u = Q.front();
    Q.pop();
    if (u != 0) {
      limit = adj[u].size();
      for (i = 0; i < limit; i++) {
        v = adj[u][i];
        if (dist[match[v]] == (1 << 28)) {
          dist[match[v]] = dist[u] + 1;
          Q.push(match[v]);
        }
      }
    }
  }
  return (dist[0] != (1 << 28));
}
bool hopcroft_karp_dfs(int u) {
  int i, v, limit;
  if (u != 0) {
    limit = adj[u].size();
    for (i = 0; i < limit; i++) {
      v = adj[u][i];
      if (dist[match[v]] == dist[u] + 1) {
        if (hopcroft_karp_dfs(match[v])) {
          match[v] = u;
          match[u] = v;
          return true;
        }
      }
    }
    dist[u] = (1 << 28);
    return false;
  }
  return true;
}
int hopcroft_karp() {
  int matching = 0, i;
  while (hopcroft_karp_bfs()) {
    for (i = 0; i < left_nodes; i++) {
      int ln = left_node[i];
      if ((match[ln] == 0) && hopcroft_karp_dfs(ln)) matching++;
    }
  }
  return matching;
}
int id(int x, int y) { return x * cols + y + 1; }
int main() {
  int i, j;
  scanf("%d %d", &rows, &cols);
  int k;
  for (i = 0; i < rows; i++) {
    for (j = 0; j < cols; j++) {
      if (i + j % 2)
        left_node[left_nodes++] = id(i, j);
      else
        right_node[right_nodes++] = id(i, j);
      for (k = 0; k < 8; k++) {
        int u = i + dx[k];
        int v = j + dy[k];
        if (u >= 0 && u < rows && v >= 0 && v < cols) {
          adj[id(i, j)].push_back(id(i + dx[k], j + dy[k]));
        }
      }
    }
  }
  printf("%d", (rows * cols) - hopcroft_karp());
  return 0;
}
