#include <bits/stdc++.h>
using namespace std;
int n, m;
int main(void) {
  cin >> n >> m;
  if (n == 1 || m == 1)
    cout << max(n, m);
  else if (n == 2 || m == 2) {
    int t = max(n, m) % 4;
    if (t == 0)
      cout << max(n, m);
    else if (t == 1)
      cout << (max(n, m) / 4) * 4 + 2;
    else
      cout << (max(n, m) / 4) * 4 + 4;
  } else
    cout << ((m * n) % 2 ? (m * n) / 2 + 1 : (m * n) / 2);
  return 0;
}
