import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long N = scan.nextLong(); long pageBase = 316; int pagePerIssue = 52; long pageTotal = pageBase + pagePerIssue * N - pagePerIssue; System.out.println(pageTotal); scan.close(); } }