#include <bits/stdc++.h>
using namespace std;
long long n,m,sol,ivice;
int main(){
  cin >> n >> m;
  if(n==1 and m==1){
    cout << "1\n" << endl;
    return 0;
  }
  else if(m==1)ivice=n;
  else if(n==1)ivice=m;
  else ivice=n*m-(n-2)*(m-2);

  sol=ivice+(n*m-ivice)/2;
  cout << sol << "\n";

}