import java.util.Scanner; public class Main_yukicoder299 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextLong(); System.out.println(316L + 52L * (n - 1)); sc.close(); } }