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