object Main extends App {
  def judge(n: Int) = for {
    a <- 0 to 9
    b <- 0 to 9
    c <- 0 to 9
    d <- 0 to 9
  } yield if (a + b + c + d == n) true else false

  Stream.continually(readInt).takeWhile(_ != null).map(n => judge(n).count(b => b)).foreach(println)
}

