#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int n, a;
	cin>>n>>a;
	
	if(n>=1 && n<=100){
		
		if(a>=0 && a<= (pow(n,2)) ){
			
			int black = pow(n,2)-a;
			cout<<black<<endl;
			
		}
		
	}
	
	return 0;
}