import java.util.Scanner; class AriBook { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); long n = stdIn.nextLong(); long pages = 316; for ( long i = 1; i < n; i++ ) { pages += 52; } System.out.println(pages); } }