#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  if (n == 1) {
    cout << m;
    return 0;
  }
  if (m == 1) {
    cout << n;
    return 0;
  }
  if (m == 2 && n == 2) {
    cout << 4;
    return 0;
  }
  if (m == 2 && n % 2 == 1) {
    cout << m * n / 2 + 1;
    return 0;
  }
  if (n == 2 && m % 2 == 1) {
    cout << m * n / 2 + 1;
    return 0;
  }
  if (m == 2) {
    int k = 1;
    int ans = 0;
    while (n > 4) {
      ans += 4;
      n -= 4;
    }
    if (n > 2) {
      ans += 4;
    } else
      ans += n * 2;
    ans = max(ans, n * m / 2);
    cout << ans;
    return 0;
  }
  if (n == 2) {
    int k = 1;
    int ans = 0;
    while (m > 4) {
      ans += 4;
      m -= 4;
    }
    if (m > 2) {
      ans += 4;
    } else
      ans += m * 2;
    ans = max(ans, n * m / 2);
    cout << ans;
    return 0;
  }
  int s = n * m;
  int ans = s / 2;
  if (s % 2 == 1) ans++;
  cout << ans;
  return 0;
}
