#include using namespace std; using ll = long long; bool is_integer(double x){ return floor(x) == x; } int main(){ double xp,yp; cin >> xp >> yp; double ans = xp*xp + yp*yp + 1; ans = floor(ans); cout << ans << endl; return 0; }