#include <bits/stdc++.h>
using namespace std;
int n, m, x, y;
unsigned long long tot;
int main() {
  tot = 0;
  cin >> n >> m;
  tot = n * m;
  if (n == 1 || m == 1)
    cout << tot << "\n";
  else if (n == 2 || m == 2)
    cout << 2 * ((2 * ((n == 2 ? m : n) / 4)) + min((n == 2 ? m : n) % 4, 2))
         << "\n";
  else {
    if (tot % 2 == 1)
      cout << (tot + 1) / 2 << "\n";
    else
      cout << tot / 2 << "\n";
  }
  return 0;
}
