package yukicoder; import java.util.Scanner; public class Yuki299 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Long num = scan.nextLong(); scan.close(); System.out.println(316 + ( 52 * ( num - 1 ))); } }