import java.util.Scanner; public class Main{ static final Scanner s=new Scanner(System.in); public static void main(String args[]){ System.out.println(316-52+52*s.nextLong()); } }