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