// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include <bits/stdc++.h>
#define ent '\n'
#define all(x) x.begin(), x.end()
#define s second
#define f first
#define pb push_back
typedef long long ll;
using namespace std;
const int maxn = 3e5 + 250;
const int mod = 1e9 + 7;
const int inf = 1e9;
const int K = 400;
const double Pi = acos(-1.0);
const long double eps = 1e-9;
#define yes cout << "YES\n";
#define no cout << "NO\n";
#define int long long
int sum = 0;
void rec(int n, int m) {
    sum += n*m;
    if(n*m==1)return    ;
    if(n>m) {
        rec(n/2+n%2,m);
        rec(n/2,m);
    } else {
        rec(n,m/2+m%2);
        rec(n,m/2);
    }
}
void solve() {
    int h, w;
    cin >> h >> w;
    rec(h, w);
    cout << sum;
}

signed main () {
    // ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    // freopen("position.in", "r" , stdin);
    // freopen("position.out", "w", stdout);
    int t=1;
    // cin >> t;
    for(int i = 1;i <= t; i++) {
        // cout << "Case " << i << ": ";
        solve();
    }
}