#include <bits/stdc++.h>
using namespace std;
const long double E = 1e-4;
const int MOD = 1e9 + 7;
const long long MAX = 1e6 + 1;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m;
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1)
    cout << max(n, m);
  else if (n == 2)
    cout << 2 * (2 * (m / 4) + min(2, m % 4));
  else
    cout << n * m / 2 + (n * m) % 2;
}
