#include <bits/stdc++.h>
#define in freopen ("input.txt", "r", stdin);
#define out freopen("output.txt", "w", stdout);
#define se second
#define fi first
#define ll long long

const int val = (2e5) + 5;
const int inf = (1e9) + 7;
double eps = 0.000000001;

using namespace std;

long long ans = 0;

void rec(ll a, ll b){
    ans += (a * b);
    if(a == 1 && b == 1) return;
    rec(max(a-1, b), min(a-1, b));
    rec(max(1ll, b), min(1ll, b));
}

int solve(){
    int a, b;
    cin >> a >> b;
    if(b > a) swap(a, b);
    rec(a, b);
    cout << ans << endl;
    return 0;
}

int main(){
    //in out
    ios_base::sync_with_stdio(0);
    int t = 1;
    //cin >> t;
    while(t --) solve();
    return 0;
}