"use strict";

const main = (arg) => {
  const input = arg.trim().split("\n");
  const N = parseInt(input[0]);
  const A = parseInt(input[1]);
  const square = N * N;
  console.log(square - A);
};
main(require("fs").readFileSync("/dev/stdin", "utf8"));
