#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: 21A
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/