#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
struct custom_hash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
    x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
    return x ^ (x >> 31);
  }
  size_t operator()(uint64_t x) const {
    static const uint64_t FIXED_RANDOM =
        chrono::steady_clock::now().time_since_epoch().count();
    return splitmix64(x + FIXED_RANDOM);
  }
};
int power(long long x, long long n, const long long P) {
  if (x == 0) return 0;
  if (n == 0 || x == 1) return 1LL;
  x %= P;
  int res = 1;
  while (n > 0) {
    if (n & 1) res = (long long int)res * x % P;
    x = (long long int)x * x % P;
    n /= 2;
  }
  return res;
}
long long int power(long long int x, long long int n) {
  if (x == 0)
    return 0;
  else if (n == 0 || x == 1)
    return 1;
  long long res = 1;
  while (n > 0) {
    if (n & 1) res *= x;
    x *= x;
    n /= 2;
  }
  return res;
}
int inv(long long x) { return power(x, 1000000007 - 2, 1000000007); }
long long int gcd(const long long int a, const long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(const long long int a, const long long int b) {
  return (a * b) / gcd(a, b);
}
pair<int, int> dx[4] = {make_pair(-1, 0), make_pair(1, 0), make_pair(0, -1),
                        make_pair(0, 1)};
bool valid(const int &last, const int &cur, const int &next, int const &n) {
  for (int i = 0; i < n; i++) {
    if (!((1 << i) & cur)) {
      bool f = 0;
      if (i && ((1 << (i - 1)) & cur))
        f = 1;
      else if (i + 1 < n && ((1 << (i + 1)) & cur))
        f = 1;
      else if ((1 << i) & last)
        f = 1;
      else if ((1 << i) & next)
        f = 1;
      if (!f) return false;
    }
  }
  return true;
}
void __sol() {
  int n, m;
  cin >> n >> m;
  if (n > 6) swap(n, m);
  int dp[m + 2][1 << n][1 << n];
  for (int i = 0; i < m + 2; i++)
    for (int j = 0; j < 1 << n; j++)
      for (int k = 0; k < 1 << n; k++) dp[i][j][k] = INT_MAX / 1000;
  for (int i = 1; i <= m; i++) {
    for (int pm = 0; pm < 1 << n; pm++) {
      for (int nm = 0; nm < 1 << n; nm++) {
        for (int lm = 0; lm < 1 << n; lm++) {
          if (i == 1 && valid(0, pm, nm, n))
            dp[i][pm][nm] = min(dp[i][pm][nm], __builtin_popcount(pm));
          else if (i == m && valid(lm, pm, 0, n))
            dp[i][pm][0] =
                min(dp[i][pm][0], __builtin_popcount(pm) + dp[i - 1][lm][pm]);
          else if (i != 1 && i != m && valid(lm, pm, nm, n))
            dp[i][pm][nm] =
                min(dp[i][pm][nm], __builtin_popcount(pm) + dp[i - 1][lm][pm]);
        }
      }
    }
  }
  int ans = INT_MAX / 1000;
  for (int i = 0; i < 1 << n; i++) ans = min(ans, dp[m][i][0]);
  cout << n * m - ans;
  return;
}
int main() {
  clock_t time_req = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int tc = 1;
  while (tc--) __sol();
  time_req = clock() - time_req;
  return 0;
}
