#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,m,max;
    cin>>n>>m;
    if(m>n) max=m;
     else max=n;
     cout<<max*max-n*m;
 
 
 
 
 
 
 
 
    return 0;
}
/**************************************************************
	Problem: 1324
	User: chenmingyu
	Language: C++
	Result: Accepted
	Time:6 ms
	Memory:2072 kb
****************************************************************/