import strutils var n = readLine(stdin).parseInt echo 316 + (52 * (n - 1))