
import java.util.Scanner;

public class Main {

    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        long sum = a + (a * a) + (a * a * a);
        System.out.println(sum);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        long sum = a + (a * a) + (a * a * a);
        System.out.println(sum);
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        int a = sc.nextInt();
        long sum = a + (a * a) + (a * a * a);
        System.out.println(sum);
    } main {
        int a = sc.nextInt();
        long sum = a + (a * a) + (a * a * a);
        System.out.println(sum);
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long sum = a + (a * a) + (a * a * a); sum a + (a * a) + (a * a * a) a + (a * a) + (a * a * a) a (a * a) a a (a * a * a) a * a * a a a a System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        long sum = a + (a * a) + (a * a * a);
        System.out.println(sum);
    }
} public class Main {

    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        long sum = a + (a * a) + (a * a * a);
        System.out.println(sum);
    }
} Main

import java.util.Scanner;

public class Main {

    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        int a = sc.nextInt();
        long sum = a + (a * a) + (a * a * a);
        System.out.println(sum);
    }
}