#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  if (n > m) swap(n, m);
  if (m <= 2)
    printf("%d", n * m);
  else if (n == 1)
    printf("%d", m);
  else if (n == 2) {
    int x = m % 4;
    if (x == 2)
      printf("%d", m + 2);
    else if (x == 1 || x == 3)
      printf("%d", n + m - 1);
    else
      printf("%d", n * m / 2);
  } else if (m == 3) {
    if (n == 2)
      printf("%d", 4);
    else if (n == 3)
      printf("%d", 5);
  } else
    printf("%d", n * m / 2 + (n * m % 2));
}
