import java.util.*; public class Test12 { public static void main(String[] args) throws Exception { // Your code here! Scanner sc=new Scanner(System.in); String[] line; String result=""; line=sc.nextLine().split(" "); result+=316+52*(Long.parseLong(line[0])-1); sc.close(); System.out.println(result); } }