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