module Main where


main :: IO()
main = do
  c <- read . head . words <$> getLine
  white <- read . head . words <$> getLine
  print $ solve c white

solve :: Int -> Int -> Int
solve c white = c * c - white
