#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const int INF = (int)1E9;
const long long INF64 = (long long)1E18;
const long double EPS = 1E-9;
const long double PI = 3.1415926535897932384626433832795;
int n, m;
int main() {
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1)
    cout << m << endl;
  else if (n == 2)
    cout << (m / 4) * 4 + 2 * min(m % 4, 2) << endl;
  else
    cout << ((n * m + 1) / 2) << endl;
  return 0;
}
