#include <bits/stdc++.h>
using namespace std;
int n, m;
bool b[1005][1005];
int f[1005][1005];
int dp(int n, int m) {
  if (n < 0 || m < 0) return 0;
  if (!b[n][m]) {
    b[n][m] = true;
    f[n][m] = 0;
    if (n > 0) f[n][m] = max(f[n][m], dp(n - 3, m) + m);
    if (m > 0) f[n][m] = max(f[n][m], dp(n, m - 3) + n);
  }
  return f[n][m];
}
int main() {
  scanf("%d%d", &n, &m);
  if (n == 1 || m == 1)
    printf("%d\n", n * m);
  else if (n == 2 || m == 2) {
    int t = (n * m) & 7;
    printf("%d\n", n * m / 8 * 4 + ((t == 6) ? 4 : t));
  } else
    printf("%d\n", (n * m + 1) / 2);
  return 0;
}
