#include <bits/stdc++.h>


using namespace std;

int main() {
  int N, M;
  cin >> N >> M;
int a=((N-2)*(M-2))/2;

 if (N%2!=0 and M%2!=0)
 a=a+1;
 if(N==1){
    cout<<M<<endl;
    return 0;
 }
 if(M==1){
    cout<<N<<endl;
    return 0;
 }
  int cuvari = (N * M ) - a ;
  cout << cuvari << endl ;

  return 0;
}