import java.util.Scanner

object Main {
  def main(args:Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val n = sc.nextLine().toInt
    val a = sc.nextLine().toInt

    println(n * n - a)
  }
}