#include <bits/stdc++.h>
using namespace std;
int dir_x[8] = {-1, -1, 1, 1, 2, 2, -2, -2};
int dir_y[8] = {2, -2, -2, 2, -1, 1, -1, 1};
int visited[1010][1010];
int cntA = 0, cntB = 0;
void dfs(int x, int y, int n, int m, bool turn) {
  if (x < 0 || x >= n || y < 0 || y >= m) return;
  if (visited[x][y]) return;
  visited[x][y] = 1;
  if (turn)
    cntA++;
  else
    cntB++;
  for (int i = 0; i < 8; i++) {
    dfs(x + dir_x[i], y + dir_y[i], n, m, !turn);
  }
  return;
}
int main() {
  int n, m;
  cin >> n >> m;
  if (min(n, m) >= 7) {
    cout << (n * m + 1) / 2 << endl;
    return 0;
  }
  if (min(n, m) == 1) {
    cout << max(n, m) << endl;
    return 0;
  }
  if (min(n, m) == 2) {
    cout << 4 * (max(m, n) / 4) + min(max(m, n) % 4, 2) * 2 << endl;
    return 0;
  }
  int ans = 0;
  for (int i = 0; i < min(n, m); i++) {
    for (int j = 0; j < max(n, m); j++) {
      if (!visited[i][j]) {
        cntA = cntB = 0;
        dfs(i, j, min(m, n), max(m, n), 0);
        ans += max(cntA, cntB);
      }
    }
  }
  cout << ans << endl;
  return 0;
}
