import java.util.*; public class antbook{ public static void main(String... args){ Scanner scan = new Scanner(System.in); long n = scan.nextLong(); System.out.println(264+52*n); } }