#include <bits/stdc++.h>
using namespace std;
long long Hash(char* str) {
  int p = 31;
  long long P = 1;
  long long res = 0;
  for (size_t i = 0; i < strlen(str); i++) {
    res += P * (str[i] - 'a');
    P *= p;
  }
  return res;
}
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
vector<long long> a;
int main() {
  int n, m;
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1)
    cout << m;
  else if (n == 2)
    cout << (m / 4) * 4 + min(4, (m % 4) * 2);
  else
    cout << (n * m + 1) / 2;
  return 0;
  return 0;
}
