#include <bits/stdc++.h>
int dr[] = {2, 2, -2, -2, 1, -1, 1, -1};
int dc[] = {1, -1, 1, -1, 2, 2, -2, -2};
int dr1[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dc1[] = {1, -1, 1, 0, -1, 0, 1, -1};
int dr2[] = {0, 0, 1, -1};
int dc2[] = {1, -1, 0, 0};
using namespace std;
int main() {
  long long n, m, ans;
  while (cin >> n >> m) {
    if (n >= 3 && m >= 3)
      ans = (n * m) / 2 + (n * m) % 2;
    else {
      if (n == 3 && m == 2 || m == 3 && n == 2 || n == 2 && m == 2)
        ans = 4;
      else if (n == 1 || m == 1) {
        if (n == 1)
          ans = m;
        else
          ans = n;
      } else if (n == 2 && m > 3 || m == 2 && n > 3) {
        if (n == 2)
          ans = (n * m) / 2 + min(m % 4, 4 - m % 4);
        else if (m == 2)
          ans = (n * m) / 2 + min(n % 4, 4 - n % 4);
      }
    }
    cout << ans << endl;
  }
  return 0;
}
