#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;
  int cuvari = (N * M ) - a ;
  cout << cuvari << endl ;

  return 0;
}