#include<bits/stdc++.h>

using namespace std;

int main(){
    long long n,m;
    cin>>n>>m;
    if(n==1 or m==1){cout<<m*n;return 0;}
    if(n%2==0 or m%2==0)cout<<(m*n)-((m-2)*(n-2)/2)<<endl;
    else cout<<(m*n)-((m-2)*(n-2)/2+1)<<endl;
}