#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

ll calc(ll a, ll b) {
  if (a > b) swap(a, b);
  ll ans = 1 + 4*a + 2*a*a + a*(a - 1);
  if (b >= 2 * a) {
    ans += 2*a*a + 2*a*a*(a - 1) + a*a*(a - 1)*(a - 1)/4;
  } else {
    for (ll i = 1; i <= a; i++) ans += 2*min(a, b - i);
    for (ll i = 1; i <= a - 1; i++) ans += 4*(a - i)*min(a, b - i);
    for (ll i = 1; i <= a - 1; i++)
      for (ll j = 1; j <= a - 1; j++)
        ans += min(a - i, b - j)*min(a - j, b - i);
  }
  return a == b ? ans - 2 : ans;
}

int main() {
  ll n, m;
  cin >> n >> m;
  n--; m--;
  ll ans = 0;
  for (ll i = 1; i <= n; i++) {
    for (ll j = 1; j <= m; j++) {
      ans += (n - i + 1)*(m - j + 1)*calc(i, j);
    }
  }
  cout << ans << endl;
  return 0;
}
