//package gfg;
import java.io.*;


public class Main {

	public static void main(String[] args) throws Exception {
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int t=Integer.parseInt(br.readLine().trim());
	int res=(t*t*t);
	int r=res;
	for(int i=0;i<2;i++) {
		res=(res/t);
		r+=res;
	}
	System.out.println(r);
	
	
	}
	
	
	
	
	
	

} import java.io.*; io.* java public class Main {

	public static void main(String[] args) throws Exception {
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int t=Integer.parseInt(br.readLine().trim());
	int res=(t*t*t);
	int r=res;
	for(int i=0;i<2;i++) {
		res=(res/t);
		r+=res;
	}
	System.out.println(r);
	
	
	}
	
	
	
	
	
	

} Main public static void main(String[] args) throws Exception {
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int t=Integer.parseInt(br.readLine().trim());
	int res=(t*t*t);
	int r=res;
	for(int i=0;i<2;i++) {
		res=(res/t);
		r+=res;
	}
	System.out.println(r);
	
	
	} main {
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int t=Integer.parseInt(br.readLine().trim());
	int res=(t*t*t);
	int r=res;
	for(int i=0;i<2;i++) {
		res=(res/t);
		r+=res;
	}
	System.out.println(r);
	
	
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int t=Integer.parseInt(br.readLine().trim()); t Integer.parseInt(br.readLine().trim()) Integer.parseInt Integer br.readLine().trim() br.readLine().trim br.readLine() br.readLine br int res=(t*t*t); res (t*t*t) t*t*t t t t int r=res; r res for(int i=0;i<2;i++) {
		res=(res/t);
		r+=res;
	} int i=0; int i=0; i 0 i<2 i 2 i++ i++ i {
		res=(res/t);
		r+=res;
	} {
		res=(res/t);
		r+=res;
	} res=(res/t) res (res/t) res t r+=res r res System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {

	public static void main(String[] args) throws Exception {
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int t=Integer.parseInt(br.readLine().trim());
	int res=(t*t*t);
	int r=res;
	for(int i=0;i<2;i++) {
		res=(res/t);
		r+=res;
	}
	System.out.println(r);
	
	
	}
	
	
	
	
	
	

} public class Main {

	public static void main(String[] args) throws Exception {
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int t=Integer.parseInt(br.readLine().trim());
	int res=(t*t*t);
	int r=res;
	for(int i=0;i<2;i++) {
		res=(res/t);
		r+=res;
	}
	System.out.println(r);
	
	
	}
	
	
	
	
	
	

} Main
//package gfg;
import java.io.*;


public class Main {

	public static void main(String[] args) throws Exception {
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int t=Integer.parseInt(br.readLine().trim());
	int res=(t*t*t);
	int r=res;
	for(int i=0;i<2;i++) {
		res=(res/t);
		r+=res;
	}
	System.out.println(r);
	
	
	}
	
	
	
	
	
	

}
