#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define int long long
#define F first
#define S second
#define all(x, n, c) sort( x + c, x + n + c )
#define allv(x) sort( x.begin(), x.end() )
#define rev(x, n, c) reverse( x + c, x + n + c )
#define revv(x) reverse( x.begin(), x.end() )
#define sz(x) (x).size()
#define nl "\n"
#define IAmTheOneWhoKnocks ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

int ans = 0;

void f( int h, int w )
{
    if( h == 1 && w == 1 )
    {
        return;
    }
    if(h >= w)
    {
        ans += h / 2 * w;
        ans += (h - h / 2) * w;
        f(h / 2, w);
        f((h - h / 2), w);
    }
    else
    {
        ans += w / 2 * h;
        ans += (w - w / 2) * h;
        f(w / 2, h);
        f((w - w / 2), h);
    }
}

void solve()
{
    int h, w;
    cin >>h >>w;
    ans += h * w;
    f(h, w);
    cout <<ans;
    return;
}

signed main()
{
    IAmTheOneWhoKnocks
    int T = 1;
    //cin >>T;
    while( T-- )
    { solve(); }
    return 0;
}
