object Main { def main(args:Array[String]) = { val sc = new java.util.Scanner(System.in) val n = sc.nextLong println(316 + ((n - 1) * 52)) } }