import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int page=316; int plusPage=52; long edition=sc.nextInt(); long totalPage=316+52*(edition-1); System.out.println(totalPage); } }