#include <bits/stdc++.h>
double const PI = 4 * atan(1.0);
using namespace std;
int n, m;
int main() {
  cin >> n >> m;
  if (n > m) swap(n, m);
  if (n == 1)
    printf("%d\n", m);
  else if (n == 2) {
    if (m % 4 == 3)
      printf("%d\n", m + 1);
    else
      printf("%d\n", m + m % 4);
  } else
    printf("%d\n", (n * m + 1) / 2);
}
