object Main extends App{ val n=io.StdIn.readInt println((1 to n).map(i=>i%10+"").reduce(_+_)*n) }