import std.stdio, std.string, std.conv, std.bigint, std.typecons, std.algorithm, std.array, std.math, std.range;
 
void main() {
    auto N = readln.chomp.to!int;
    auto A = readln.chomp.to!int;
    writeln(N^^2 - A);
}
