#include <bits/stdc++.h>
using namespace std;
int di[] = {1, -1, 1, -1, 2, -2, 2, -2};
int dj[] = {2, 2, -2, -2, 1, 1, -1, -1};
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  while (cin >> n >> m) {
    bool grid[n][m];
    if (m == 2) swap(n, m);
    memset((grid), 0, sizeof((grid)));
    if (n == 2) {
      int r = 0;
      for (int i = 0; i < m; i += 4) {
        if (i + 4 >= m) {
          if (i + 1 >= m)
            r += 2;
          else
            r += 4;
        } else
          r += 4;
      }
      cout << r << endl;
    } else {
      for (int i = 0; i < n; i++) {
        for (int j = i % 2; j < m; j += 2) {
          grid[i][j] = 1;
        }
      }
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
          if (!grid[i][j]) {
            bool f = 0;
            for (int k = 0; k < 8; k++) {
              int ni = i + di[k];
              int nj = j + dj[k];
              if (ni >= 0 && ni < n && nj >= 0 && nj < m && grid[ni][nj]) f = 1;
            }
            if (!f) grid[i][j] = 1;
          }
        }
      }
      int r = 0;
      for (int i = 0; i < n; i++)
        for (int j = 0; j < m; j++) r += grid[i][j];
      cout << r << endl;
    }
  }
}
