object Main extends App {

  Stream.continually(readLine)
    .takeWhile(_ != null)
    .map(_.toInt)
    .map(area(x => x * x))
    .foreach(println)

  def area(f: Long => Long)(d: Int): Long = {
    Range(0, 600, d).map(dd => d * f(dd.toLong)).sum
  }
}

