function main(input) {
  input=input.trim();
  const n = parseInt(input.split("\n")[0], 10);
  const a = parseInt(input.split("\n")[1], 10);
  console.log(n*n-a);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));

