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