#include <bits/stdc++.h>
using namespace std;
long long n, m, ans;
int main() {
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1)
    ans = n * m;
  else if ((n == 2) && (m % 2 == 1))
    ans = m + 1;
  else if ((n == 2) && (m % 4 == 2))
    ans = m + 2;
  else
    ans = ((n * m) + 1) / 2;
  cout << ans << endl;
  return 0;
}
