#include <bits/stdc++.h>
using namespace std;
long long n, m;
int sol(int n, int m) {
  if (m > n) n ^= m ^= n ^= m;
  if (m == 1)
    return n;
  else if (m == 2)
    return 2 * (2 * (n / 4) + min(n % 4, 2));
  else if (m == 3 && n == 3)
    return 5;
  else if (m == 3 && n == 5)
    return 8;
  return m * n - m * n / 2;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  cout << sol(n, m);
  return 0;
}
