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