import java.util.Scanner; public class Main{ private static Scanner sc=new Scanner(System.in); public static void main(String args[])throws Exception{ long n=sc.nextLong(),org=316; org+=(n-1)*52; System.out.println(org); } }