$n = intval(trim(fgets(STDIN))); echo(316 + (52 * ($n - 1)));