#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const long long INF = (long long)1e18;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int N = 100100;
int n, m;
int main() {
  cin >> n >> m;
  if (m == 1 || n == 1 || (n == 2 && m == 2)) return cout << m * n << endl, 0;
  if (n < m) swap(n, m);
  if (m == 2) {
    int k = n / 4;
    int ans = k * 4;
    k = n % 4;
    ans += 2 * min(2, k);
    return cout << ans << endl, 0;
  }
  cout << (n * m + 1) / 2 << endl;
  return 0;
}
