import strutils echo(316.int64 + 52.int64 * (stdin.readline.parseBiggestInt - 1.int64))