#include <bits/stdc++.h>
using ll = long long;
int main() {
  int n, m;
  std::cin >> n >> m;
  if (m > n) std::swap(m, n);
  if (m == 1) {
    std::cout << n << std::endl;
  } else if (m == 2) {
    std::cout << 2 * (2 * (n / 4) + std::min(2, n % 4)) << std::endl;
  } else {
    std::cout << n * m - (n * m) / 2 << std::endl;
  }
  return 0;
}
