#include<bits/stdc++.h> using namespace std; int main(){ int n,k; cin>>n>>k; cout<<k-n*n+1; return 0; }