// unihernandez22
// https://atcoder.jp/contests/abc074/tasks/abc074_a
// implementation

var input = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');
let n = parseInt(input[0]);
let a = parseInt(input[1]);
console.log(n*n - a);
