#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-9;
const int MOD = 7 + 1e9;
const int N = (1 << 19);
const long long OO = (long long)1 * 1e18;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
int main() {
  cin.sync_with_stdio(0);
  long long n, m;
  cin >> n >> m;
  if (n < m) swap(n, m);
  if (m == 1)
    cout << n;
  else if (n == 3 && m == 2)
    cout << 4;
  else if (m == 2)
    cout << 2 * (2 * (n / 4) + min(n % 4, 2ll));
  else
    cout << (n * m + 1) / 2;
  return 0;
}
