#include <bits/stdc++.h>
using namespace std;
int xx[] = {1, 1, 1, 0, -1, -1, -1, 0};
int yy[] = {-1, 0, 1, 1, 1, 0, -1, -1};
long long int gcd(long long int a, long long int b) {
  return ((a % b == 0) ? b : gcd(b, a % b));
}
int main() {
  int n, m, k;
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1) {
    cout << m << endl;
    return 0;
  }
  if (n == 2) {
    k = m % 4;
    if (k == 3) k = 2;
    cout << (m / 4) * 4 + k * 2 << endl;
    ;
    return 0;
  }
  cout << (n * m + 1) / 2 << endl;
  return 0;
}
