#include <bits/stdc++.h>
using namespace std;
int adj[500050][10];
int nadj[500050];
int seen[500050];
int pasangleft[500050], pasangright[500050];
int bpm(int u, int signal) {
  for (int(i) = 0; (i) < (nadj[u]); ++(i)) {
    int v = adj[u][i];
    if (seen[v] == signal) continue;
    seen[v] = signal;
    if (pasangright[v] < 0 || bpm(pasangright[v], signal)) {
      pasangleft[u] = v;
      pasangright[v] = u;
      return 1;
    }
  }
  return 0;
}
int bipartite(int n, int m) {
  for (int(i) = 0; (i) < (n); ++(i)) pasangleft[i] = -1;
  for (int(i) = 0; (i) < (m); ++(i)) pasangright[i] = -1;
  int ret = 0;
  for (int(i) = 0; (i) < (n); ++(i))
    for (int(j) = 0; (j) < (nadj[i]); ++(j))
      if (pasangleft[i] < 0 && pasangright[adj[i][j]] < 0) {
        pasangleft[i] = adj[i][j];
        pasangright[adj[i][j]] = i;
        ++ret;
      }
  for (int(i) = 0; (i) < (m); ++(i)) seen[i] = -1;
  for (int(i) = 0; (i) < (n); ++(i)) random_shuffle(adj[i], adj[i] + nadj[i]);
  for (int(i) = 0; (i) < (n); ++(i)) {
    if (pasangleft[i] != -1) continue;
    if (bpm(i, i)) ++ret;
  }
  return ret;
}
int kod[1020][1020];
int main() {
  int n, m;
  cin >> n >> m;
  int ra = 0;
  int rb = 0;
  for (int(i) = 0; (i) < (n); ++(i))
    for (int(j) = 0; (j) < (m); ++(j)) {
      if ((i + j) % 2) {
        kod[i][j] = rb;
        ++rb;
      } else {
        kod[i][j] = ra;
        ++ra;
      }
    }
  int dr[] = {-1, 1, -1, 1, -2, 2, -2, 2};
  int dc[] = {2, 2, -2, -2, 1, 1, -1, -1};
  for (int(i) = 0; (i) < (n); ++(i))
    for (int(j) = 0; (j) < (m); ++(j))
      if ((i + j) % 2) {
        for (int(k) = 0; (k) < (8); ++(k)) {
          int ni = i + dr[k];
          int nj = j + dc[k];
          if (ni < 0 || ni >= n || nj < 0 || nj >= m) continue;
          adj[kod[i][j]][nadj[kod[i][j]]] = kod[ni][nj];
          nadj[kod[i][j]]++;
        }
      }
  cout << n * m - bipartite(rb, ra) << endl;
}
