#include<bits/stdc++.h>
using namespace std;
/*
int res(string &s){
int n = s.size();
vector<int> gaps;
int count1 = 0;
int max1 = 0;
bool gap = false;
for(int i=0; i<n; i++){
if(s[i]=='1'){
count1++;
max1 = max(max1,count1);
gap = false;
}
else{
if(count1>0){
gaps.push_back(count1);
count1 = 0;
}
gap = true;
}
}
if(count1>0) gaps.push_back(count1);
sort (gaps.rbegin(),gaps.rend());
int result=0;
for(int i=0; i<gaps.size(); i+=2){
result+=gaps[i];
}
return result;
}
int main(){
int t;
cin>>t;
while(t--){
int N;
string S;
cin>>N>>S;
cout<<res(S)<<endl;
}
return 0;
}
*/
long long res2(int H, int W){
int mini = min(H,W);
long long tot = 0;
for(int k=1; k<=mini; k++){
tot += (long long)(H-k+1)*(W-k+1);
}
return tot;
}
int main(){
int H,W;
cin>>H>>W;
cout<<res2(H,W)<<endl;
return 0;
}