#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  if (n == 1 || m == 1) {
    printf("%d\n", n + m - 1);
    return 0;
  } else if (n == 2 || m == 2) {
    int t = (n + m - 2);
    int ans = (t / 4) * 4;
    if (t % 4 == 1)
      ans += 2;
    else if (t % 4 == 2)
      ans += 4;
    else if (t % 4 == 3)
      ans += 4;
    printf("%d\n", ans);
    return 0;
  }
  int k1 = m / 2, k2 = m / 2 + m % 2;
  int k = k1 + k2;
  printf("%d\n", n / 2 * k + (n % 2) * k2);
  return 0;
}
