#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b;
if(a<b){
c=(b-a)*b;
}else if(a>b){
c=(a-b)*a;
}
cout<<c;
}
/**************************************************************
Problem: 1324
User: toughuatao1
Language: C++
Result: Accepted
Time:7 ms
Memory:2072 kb
****************************************************************/