#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int n;
int count_bits(const int n, const bool bit = 1) {
  int count = 0;
  for (int i = 0; i < sizeof(n) * 8; ++i) {
    if ((n >> i) & 1 == bit) ++count;
  }
  return count;
}
inline bool check(const int n, const int lastLine, const int currentLine,
                  const int nextLine) {
  if (((currentLine & lastLine & nextLine) & 1) && ((1 << 1) & currentLine))
    return false;
  if (((currentLine & lastLine & nextLine) & (1 << (n - 1))) &&
      ((1 << (n - 2)) & currentLine))
    return false;
  for (int i = 1; i < n - 1; ++i) {
    if ((1 << i) & currentLine) {
      if (((1 << i) & (lastLine & nextLine)) &&
          ((1 << (i + 1)) & (currentLine)) && ((((1 << i) >> 1) & currentLine)))
        return false;
    }
  }
  return true;
}
[[deprecated]] bool checklineM(int dongtren, int dongduoi) {
  return check(n, dongtren, dongduoi, ~0);
}
int main() {
  int m;
  cin >> m >> n;
  if (n > m) swap(m, n);
  if (n == 1) return cout << ceil(double(m) / 3) * 2 - (3 - (m % 3)) % 3, 0;
  int maxSet = (1 << n);
  vector<vector<vector<int>>> dp(
      m + 1, vector<vector<int>>(maxSet, vector<int>(maxSet, 0)));
  for (int i = 0; i < maxSet; ++i) {
    for (int j = 0; j < maxSet; ++j) {
      dp[1][i][j] = count_bits(i);
    }
  }
  for (int i = 2; i <= m; ++i) {
    for (int set1 = 0; set1 < maxSet; ++set1) {
      for (int set2 = 0; set2 < maxSet; ++set2) {
        for (int set3 = 0; set3 < maxSet; ++set3) {
          bool current_check;
          if ((i == m) && (i == 2))
            current_check = check(n, set2, set1, maxSet - 1) &&
                            check(n, maxSet - 1, set2, set1);
          else if (i == 2)
            current_check = check(n, maxSet - 1, set2, set1);
          else if (i == m)
            current_check =
                check(n, set2, set1, maxSet - 1) && check(n, set3, set2, set1);
          else
            current_check = check(n, set3, set2, set1);
          if (current_check)
            dp[i][set1][set2] = max(dp[i][set1][set2],
                                    dp[i - 1][set2][set3] + count_bits(set1));
        }
      }
    }
  }
  int ans = 0;
  for (const auto& d : dp[m]) {
    ans = max(ans, *max_element(d.begin(), d.end()));
  }
  cout << ans;
}
