#include <bits/stdc++.h>
using namespace std;
int n, m, dp[45][260][260];
int main() {
  scanf("%d%d", &n, &m);
  if (n == 1 && m == 1) {
    puts("0");
    return 0;
  }
  if (n < m) swap(n, m);
  memset(dp, 0x3f3f3f, sizeof(dp));
  for (int i = 0; i < (1 << m); ++i) {
    int tot = 0, flag = 0;
    int vis[15];
    memset(vis, 0, sizeof(vis));
    for (int k = 1; k <= m; ++k)
      if (i & (1 << (k - 1))) tot++, vis[k] = vis[k - 1] = vis[k + 1] = 1;
    dp[1][0][i] = tot;
  }
  int ans = 1061109567;
  for (int i = 2; i <= n; ++i) {
    for (int j = 0; j < (1 << m); ++j) {
      for (int k = 0; k < (1 << m); ++k) {
        int tot = 0;
        for (int p = 1; p <= m; ++p) {
          if (j & (1 << (p - 1))) tot++;
        }
        for (int q = 0; q < (1 << m); ++q) {
          int vis2[10];
          memset(vis2, 0, sizeof(vis2));
          for (int p = 1; p <= m; ++p) {
            if (q & (1 << (p - 1))) vis2[p] = 1;
          }
          for (int p = 1; p <= m; ++p) {
            if (j & (1 << (p - 1))) vis2[p] = 1;
          }
          for (int p = 1; p <= m; ++p) {
            if (k & (1 << (p - 1))) vis2[p] = vis2[p - 1] = vis2[p + 1] = 1;
          }
          int fflag = 0;
          for (int p = 1; p <= m; ++p) {
            if (vis2[p] == 0) {
              fflag = 1;
              break;
            }
          }
          if (fflag == 1) continue;
          dp[i][k][j] = min(dp[i][k][j], dp[i - 1][q][k] + tot);
          if (i == n) {
            int vis[10];
            memset(vis, 0, sizeof(vis));
            for (int p = 1; p <= m; ++p) {
              if (j & (1 << (p - 1))) vis[p - 1] = vis[p] = vis[p + 1] = 1;
            }
            for (int p = 1; p <= m; ++p) {
              if (k & (1 << (p - 1))) vis[p] = 1;
            }
            int flag = 0;
            for (int p = 1; p <= m; ++p) {
              if (vis[p] == 0) {
                flag = 1;
                break;
              }
            }
            if (flag == 1) continue;
            ans = min(ans, dp[i][k][j]);
          }
        }
      }
    }
  }
  printf("%d\n", n * m - ans);
}
