import java.util.Scanner; public class yukicoder_299 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); long n = scanner.nextLong(); long page= 316L + 52 * (n - 1); System.out.println(page); } }