object Main extends App {
  import scala.annotation.tailrec

  def high(x: Int): Int = x * x
  def rectangle(y: Int, d: Int): Int = y * d
  def area(x: Int, d: Int): Int = {
    if (x == d) 0
    else {
      val n = x - d
      area(n, d) + rectangle(high(n), d)
    }
  }

  @tailrec
  def loop() {
    val line = scala.io.StdIn.readLine()
    if (line == null) return
    else {
      val d = line.toInt
      println(area(600, d))
      loop()
    }
  }

  loop()
}