object Main { def main (args: Array[String]){ var n: Long = scala.io.StdIn.readLine().toLong var N: Long = 316 println(N+52*(n-1)) } }