#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000009;
const double PI = acos(-1.0);
const double eps = 1e-8;
const int MAXN = 0;
const int MAXM = 0;
int main() {
  long long n, m, p;
  cin >> n >> m;
  if (n == 1 || m == 1) {
    cout << n * m << endl;
    return 0;
  }
  if (n == 2 || m == 2) {
    if (n == 2)
      p = m;
    else
      p = n;
    if (p % 4 == 0) cout << p << endl;
    if (p % 4 == 1 || p % 4 == 3) cout << p + 1 << endl;
    if (p % 4 == 2) cout << p + 2 << endl;
    return 0;
  }
  cout << (n * m + 1) / 2 << endl;
  return 0;
}
