/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>

using namespace std;

long long int kov(int n, int m){
    if(n==1 and m==1) return 1;
    else if(n==1) {
        if(m%2==0) {
            return m+2*kov(1, m/2);
        }
        else {
            return m+kov(1, m/2)+kov(1,m/2+1);
        }
    }
    else if(m==1) {
        if(n%2==0) {
            return n+2*kov(1, n/2);
        }
        else {
            return n+kov(1, n/2)+kov(1,n/2+1);
        }
    }
    else if(n>1){
        if(n%2==0) {
            return n*m+2*kov(n/2, m);
        }
        else {
            return n*m+kov(n/2, m)+kov(n/2+1,m);
        }
        
    }
    else if(m>1){
        if(m%2==0) {
            return n*m+2*kov(n, m/2);
        }
        else {
            return n*m+kov(n, m/2)+kov(n,m/2+1);
        }
        
    }
}

int main()
{
    long long int h, w;
    cin>>h>>w;
    //long long int *kov = new long long int[h][w];
    
    
    cout<<kov(h,w)<<endl;
   // cout<<h/w;

    return 0;
}
