import java.util.Scanner; public class No_299 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Long N = sc.nextLong(); Long m = 316 + ((N - 1) * 52); System.out.println(m); } }