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