import java.util.Scanner;
import java.lang.Math;

public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        double exp = num+Math.pow(num,2)+Math.pow(num,3);
        int result = (int)exp;
        System.out.println(result);
        scan.close();
    }
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        double exp = num+Math.pow(num,2)+Math.pow(num,3);
        int result = (int)exp;
        System.out.println(result);
        scan.close();
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        double exp = num+Math.pow(num,2)+Math.pow(num,3);
        int result = (int)exp;
        System.out.println(result);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        double exp = num+Math.pow(num,2)+Math.pow(num,3);
        int result = (int)exp;
        System.out.println(result);
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan double exp = num+Math.pow(num,2)+Math.pow(num,3); exp num+Math.pow(num,2)+Math.pow(num,3) num+Math.pow(num,2)+Math.pow(num,3) num Math.pow(num,2) Math.pow Math num 2 Math.pow(num,3) Math.pow Math num 3 int result = (int)exp; result (int)exp System.out.println(result) System.out.println System.out System System.out result scan.close() scan.close scan String[] args args public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        double exp = num+Math.pow(num,2)+Math.pow(num,3);
        int result = (int)exp;
        System.out.println(result);
        scan.close();
    }
} public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        double exp = num+Math.pow(num,2)+Math.pow(num,3);
        int result = (int)exp;
        System.out.println(result);
        scan.close();
    }
} Main
import java.util.Scanner;
import java.lang.Math;

public class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        double exp = num+Math.pow(num,2)+Math.pow(num,3);
        int result = (int)exp;
        System.out.println(result);
        scan.close();
    }
}