#include <iostream>
using namespace std;
int main() {
long long a,b;
cin >> a >> b;
cout << a*a+b*b << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglsb25nIGxvbmcgYSxiOwoJY2luID4+IGEgPj4gYjsKCWNvdXQgPDwgYSphK2IqYiA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=