#include <bits/stdc++.h>
using namespace std;
int em, n,m,nm,res;
int main(){
    cin >> n >> m;
    nm=(n*m);
    if(n>=1 and m==1){
    cout<<n;
    }
    else if(n==1 and m>=1){
    cout<< m;
    }
    else if(n>=1 and m==2){
        cout<<nm;
    }
        else if(n==2 and m>=1){
            cout<<nm;
        }
            else if(n==3 and m==3){
        cout<<"8";
    }
                else if(n==4 and m==3){
        cout<<"11";
    }
                    else if(n==5 and m==3){
        cout<<"13";
    }                     else if(n==4 and m==4){
        cout<<"14";
    }
                                else if(n==5 and m==4){
        cout<<"17";
    }
                                        else if(n==5 and m==5){
        cout<<"20";
    }

                        else if(n==3 and m==4){
        cout<<"11";
    }
                                else if(n==3 and m==5){
        cout<<"13";
    }
                                    else if(n==4 and m==5){
        cout<<"17";
                                    }
 else{
em=(m-2)/2;
res=nm-em;
if(m%2==0){
cout<<res;
}
else{
cout<<res-1;

}

 }
return 0;
}