#include <iostream>
#include <vector>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <algorithm>
#include <map>
#include <deque>
#define int long long
#define double long double
using ll = long long;
using namespace std;
const int mod = 1e9 + 7;
const int INF = 1e9 + 7;
#define get_time (double)clock() / (double)(CLOCKS_PER_SEC)
#ifndef ONLINE_JUDGE
#define debug(x) cerr << (#x) << ": " << x << endl;
#else
#define debug(x)
#endif
ll max(ll a, ll b) {
    return (a > b) ? a : b;
}
ll min(ll a, ll b) {
    return (a < b) ? a : b;
}
ll bs_sqrt(ll x) {
    ll left = 0, right = 2000000123;
    while (right > left) {
        ll mid = (left + right) / 2;
        if (mid * mid > x) {
            right = mid;
            continue;
        }
        left = mid + 1;
    }
    return left - 1;
}
int gcd(int a, int b) {
    while (a > 0 && b > 0) {
        int c = a;
        a = b % a;
        b = c;
    }
    return a + b;
}
int bin_pow(int a, int n) {
    if (n == 0) return 1;
    if (n % 2 == 0) {
        ll t = bin_pow(a, n / 2);
        return (t * t);
    }
    else {
        ll t = bin_pow(a, n - 1);
        return (t * a);
    }
}
void solve() {
    int h, w;
    cin >> h >> w;
    vector<int> dp(max(h, w) + 1);
    int mx = max(h, w) + 1;
    dp[1] = 1;
    for (int i = 2; i < mx; i++) {
        dp[i] = dp[i - 1] + 1;
        dp[i] += i;
    }
    int ans = dp[w] * h;
    ans += (dp[h] - h) * w;
    cout << ans;

}
int cur = 1;
vector<vector<int>> gr;
void perebor(int v, int level) {

}
bool cmp(pair<int, int> a, pair<int, int> b) {
    if (a.first > b.first) return 1;
    else if (a.first < b.first) return 0;
    else {
        if (a.second < b.second) return 1;
        else return 0;
    }
}
void solve1() {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    map<int, int> m;
    for (auto c : a) {
        m[c]++;
    }
    if ((m.size() * 2 - 1) != n) {
        cout << -1;
        return;
    }
    int col = m.size();
    vector<pair<int, int>> v;
    for (auto c : m) {
        v.push_back({ c.second,c.first });
    }
    sort(v.rbegin(), v.rend(),cmp);
    for (int i = 0; i < col; i++) {
        cout << v[i].first << " " << v[i].second;
    }
    for (auto c : v) {
        gr[c.first].push_back(c.second);
    }
}

signed main() {
    /*
    #ifdef ONLINE_JUDGE 
    freopen("game.in", "r", stdin);
    freopen("game.out", "w", stdout);
    #endif
    */
    cout << fixed << setprecision(20);
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}