#include <bits/stdc++.h>
using namespace std;
signed long long n,m,brojac;
int main(){
    cin>>n>>m;
    brojac=0;
    for(int i=1;i<=n;i++){
        if((i==1 or i==n) or (m==1 or m==2))
            brojac+=m;
        else if(i%2==0)
            brojac+=(m/2)+1;
        else if(i%2==1)
            brojac+=m-1;
    }
    cout<<brojac<<'\n';
return 0;
}