function Main(input) {
    inputs = input.split(/\n/)
    console.log(i(inputs[0]) * i(inputs[0]) - i(inputs[1]))
}
function i(x){ return parseInt(x, 10)}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));