Problem:
 Score : 100 points    Problem Statement Given an integer a as input, print the value a + a^2 + a^3 .      Constraints  1 \leq a \leq 10  a is an integer.         Input Input is given from Standard Input in the following format:  a       Output Print the value a + a^2 + a^3 as an integer.        Sample Input 1 2      Sample Output 1 14  When a = 2 , we have a + a^2 + a^3 = 2 + 2^2 + 2^3 = 2 + 4 + 8 = 14 .  Print the answer as an input. Outputs such as 14.0 will be judged as incorrect.       Sample Input 2 10      Sample Output 2 1110

Solution (Python):
a = int(input())
ans = a + a ** 2 + a ** 3
print(ans)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a**3 + a ** 2 + a)

Solution (Python):
a = int(input())
ans = a + a**2 + a**3
print(ans)

Solution (Python):
a = int(input())

print(a + a * a + a * a * a)

Solution (Python):
from sys import stdin

def main():
    n = int(input())
    nn = n ** 2
    nnn = n ** 3
    ans = n + nn + nnn
    print(ans)
    

if __name__ == "__main__":
    main()

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):
n = int(input())
print(n+(n*n)+(n*n*n))

Solution (Python):
a = int(input())
result = a + a**2 + a**3
print(result)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + a*a + a*a*a)

Solution (Python):
a = int(input())
sum=a + a**2 + a**3
print(sum)

Solution (Python):
a = int(input().rstrip())
print(a + a*a + a*a*a)

Solution (Python):
a = int(input())
print (a + a ** 2 + a ** 3)

Solution (Python):
a = int(input())
b = a + (a**2) + (a**3)
print(b)

Solution (Python):
x = int(input())
print(x+x**2+x**3)

Solution (Python):
A=int(input())
print(A+A**2+A**3)

Solution (Python):
a=int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

ans = a + a*a + a*a*a
print(ans)

Solution (Python):
a = int(input())

print(a+(a**2) + (a**3))

Solution (Python):
a = int(input())
b = a + a ** 2 + a ** 3
print(b)

Solution (Python):
def main():
  a = int(input())
  print(a+(a*a)+(a*a*a))
main()

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a  = int(input())
print(a+a**2+a**3)

Solution (Python):
a = input()
a = int(a)
print(a + a*a + a*a*a)

Solution (Python):
A=int(input())
print(A+A*A+A*A*A)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())

print(a + a * a + a * a * a)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a=int(input())
print(a**2+a**3+a)

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):
n=int(input())
print(n+n**2+n**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a+ a*a+a*a*a)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
sum = int(a + a * a + a * a * a)
print(sum)

Solution (Python):
a = int(input())

print(a + a * a + a * a * a)

Solution (Python):
n=int(input())

print(int(n+n**2+n**3))

Solution (Python):
a = int(input())
print(a*(1+a+a*a))

Solution (Python):
a = int(input())
s = a+a**2+a**3
print(s)

Solution (Python):
N = int(input())
print(N + N ** 2 + N ** 3)

Solution (Python):
import sys
import math


from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007

a=ii1()
print(int(a+a*a+a*(a*a)))

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
n= int(input())
print(n+n**2 + n**3)

Solution (Python):
a = int(input())
print(a + a ** 2 + a ** 3)

Solution (Python):
a=int(input())

ans = a+a**2 + a**3

print(ans)

Solution (Python):
num = int(input())
print(num+num**2+num**3)

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
data = int(input())

ans = data + data**2 + data**3

print(ans)

Solution (Python):
a = int(input())

print(a **1 + a**2 + a**3)

Solution (Python):
a = int(input())

x = a + a**2 + a**3
print(x)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
ans = a + a*a + a*a*a
print(ans)

Solution (Python):
n = int(input())
print(n+n**2+n**3)

Solution (Python):
a=int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):



def main():
    a = int(input())

    print(a + a ** 2 + a ** 3)




if __name__ == '__main__':
    main()

Solution (Python):
import logging

logging.basicConfig(level=logging.INFO)
logging.info('info')

def main():
    a=int(input())
    print(a + a ** 2 + a ** 3)

    
if __name__ == "__main__":
    main()

Solution (Python):
a = int(input())
ans = a+(a**2)+(a**3)
print(ans)

Solution (Python):
def A(x):
  return x + x**2 + x**3


def B(n, k, p_list):
  pass


def C(N):
  pass


def main():
  print(A(int(input())))
  
  
  
  


if __name__ == '__main__':
  main()

Solution (Python):
from sys import exit





a, = map(int, input().split())

print(int(a+a**2+a**3))

Solution (Python):
a=int(input())
print(a+(a*a)+(a*a*a))

Solution (Python):
a=int(input()) 	

b = pow(a, 2)
c = pow(a, 3)

print(a+b+c)

Solution (Python):















mod = int(1e9+7)

INF = 1<<50

def readInt():
    return list(map(int,input().split()))

def main():
    a = int(input())
    print(a+a*a+a**3)
    return

if __name__=='__main__':
    main()

Solution (Python):
N=int(input())
print(N+N**2+N**3)

Solution (Python):
a = int(input())
print(int(a + a**2 + a**3))

Solution (Python):
a=int(input())
print(a+a*a+a*a*a)

Solution (Python):
n = int(input().rstrip())
print(int(n+n**2+n**3))

Solution (Python):
n = int(input())
print(n+n*n+n*n*n)

Solution (Python):
a = int(input())
ans = a + a*a + a*a*a
print(ans)

Solution (Python):


A = int(input())

print(A + A**2 + A**3)

Solution (Python):
a = int(input())
print(int(a+a**2+a**3))

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print(a+(a**2)+(a**3))

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    a = int(lines[0])
    

    return (a, )


def solve(a):

    result = a + a*a + a*a*a

    return result
    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Solution (Python):
a = int(input())

x = a+ a*a + a*a*a 

print(x)

Solution (Python):


import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict

a = int(input())
ans = a+a**2+a**3
print(ans)

Solution (Python):
import math

a = int(input())
ans = a + pow(a,2) + pow(a,3)
print(ans)

Solution (Python):
a = int(input())
ans = a + (a ** 2) + (a ** 3)
print(ans)

Solution (Python):
n=int(input())
print(n+n**2+n**3)

Solution (Python):
a = int(input()) 

output = a+ (a**2) + a**3

print(output)

Solution (Python):
a = int(input())
print(a  + a**2 + a**3)

Solution (Python):
a=int(input())
print(a+a*a+a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

ans = a + a ** 2 + a ** 3

ans = int(ans)

print(ans)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a=int(input())
print(a+a*a+a*a*a)

Solution (Python):
a=input().split(" ")
b=int(a[0])
c=b+(b*b)+(b*b*b)
print(c)

Solution (Python):
def Calc():

    a = int(input())

    total = a + pow(a, 2) + pow(a, 3)
    
    print(total)

if __name__ == '__main__':
    Calc()

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
result = a + a**2 + a**3
print(result)

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(open(0).read())
print(a + a**2 + a**3)

Solution (Python):
a=int(input())
print(str(a+a**2+a**3))

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())

ans = a + a**2 + a**3

print(ans)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
import sys

a = int(sys.stdin.read())
print(a + a ** 2 + a ** 3)

Solution (Python):
n = int(input())
print(n+(n**2)+(n**3))

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
total=int(a+a**2+a**3)
print(total)

Solution (Python):
a = int(input())
a_eq = a + a*a + a*a*a
print(int(a_eq))

Solution (Python):
a = int(input())
ans = a + a**2 + a**3
print(ans)

Solution (Python):
A=int(input())
print(A+A**2+A**3)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):


a = int(input())
print(a**3+a**2+a)

Solution (Python):
a = int(input())
print(a + a**2 +a**3)

Solution (Python):
n = int(input())
print(int(n * (1 + n * (1 + n))))

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a * (1 + a + a * a))

Solution (Python):
a = int(input())

ans = a + a**2 + a**3

print(ans)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print(int(a+a*a+a*a*a))

Solution (Python):
n=int(input())
print(n+n**2+n**3)

Solution (Python):
a=int(input())

print(a+a**2+a**3)

Solution (Python):
a=int(input())

print(a+a*a+a*a*a)

Solution (Python):
a = int(input())

ans = a + a**2 + a**3

print(ans)

Solution (Python):
a=int(input())

print(a+a**2+a**3)

Solution (Python):
a = int (input())
print (int(a + a**2 + a**3))

Solution (Python):
a=int(input())
b= a*a
c= a*a*a
res = int(a + b + c)
print(res)

Solution (Python):
a = int(input())
print(a + (a**2) + (a**3))

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
n=int(input())


sum_data=n+n*n+n*n*n
print(sum_data)

Solution (Python):
a = int(input())
ans = a + a*a + a*a*a
print(ans)

Solution (Python):
a = int(input())

ans = a + a**2 + a**3

print(ans)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
def main ():    
    a = int(input())
    print(a + a * a + a * a * a)
main ()

Solution (Python):
a= int(input())
print(a + (a**2) + (a**3))

Solution (Python):
a = int(input())

A = a + a**2 + a**3

print(A)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())
b = int()
b = a+a**2+a**3
print(b)

Solution (Python):
a = int(input())
a = a + a**2 + a**3
print(int(a))

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
ans = a + a ** 2 + a ** 3
print(ans)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + pow(a,2) + pow(a,3))

Solution (Python):
a = int(input())
print(a+(a**2)+(a**3))

Solution (Python):
a = int(input())

print(a + a * a + a * a * a)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())
s = a  + a**2 + a**3
print(s)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):

a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())

print(a + a *a + a * a * a)

Solution (Python):
a = int(input())
x = a + a**2 + a**3
print(x)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())

print(a+a*a+a*a*a)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

ans = a + a*a + a*a*a

print(ans)

Solution (Python):

a = int(input().strip())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())

print(a + (a**2) + (a**3))

Solution (Python):
a=int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
ans =(a + a ** 2 + a ** 3) // 1
print(ans)

Solution (Python):
a = int(input())

ans = a+(a**2)+(a**3)

print(ans)

Solution (Python):
a = int(input())
ans = int(a+a**2+a**3)
print(ans)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + a * a + a * a * a)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):

n = int(input())
ans = 0
for i in range(1,4):
    ans += n ** i

print(ans)

Solution (Python):
a = int(input())

answer = int(a + a**2 + a**3)
print(answer)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):
a=int(input())
print(int(a+(a**2)+(a**3)))

Solution (Python):
a = int(input())

print(a + (a ** 2) + (a ** 3))

Solution (Python):
n = int(input())

print(int(n+n*n+n*n*n))

Solution (Python):
import sys
sys.setrecursionlimit(10**6)

a = int(input())










ans = a+a**2+a**3
print(ans)

Solution (Python):
def resolve():
    a = int(input())
    print(a+a*a+a*a*a)
    
resolve()

Solution (Python):
n = int(input())   
print(int(n+n**2+n**3))

Solution (Python):
a = int(input())
print( a + a**2 + a **3)

Solution (Python):
a=int(input())

ans=a+a**2+a**3
print(ans)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
res = int(a + a*a + a*a*a)
print(res)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
x = a + a*a + a*a*a
print(x)

Solution (Python):
n=int(input())
print(n+n**2+n**3)

Solution (Python):
a=int(input())

print(a+a*a+a*a*a)

Solution (Python):
N = int(input()) 

print(N + N * N +N*N*N)

Solution (Python):
inp1 = input()
num = int(inp1)
print(num + num**2 + num**3)

Solution (Python):
a = int(input())

print(a + a*a + a*a*a)

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
a=int(input())

print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
b=a**2+a**3+a
print(b)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
s = [input() for i in range(1)] 
s0 = int(s[0])

print(s0+s0*s0+s0*s0*s0)

Solution (Python):
a = int(input())
ans = a + a**2 + a**3
print(ans)

Solution (Python):
a = int(input())
aa = a**2
aaa = a**3
ans = a + aa + aaa
print(ans)

Solution (Python):
a = int(input())
print(int(a + a**2 + a**3))

Solution (Python):
a = int(input())

ans = a + a **2 + a ** 3
print(ans)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
N = int(input())
print(N + N ** 2 + N ** 3)

Solution (Python):
a = int(input())
x = a + a**2 + a**3

print(x)

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(int(a+a**2+a**3))

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
n = int(input())

print(n+(n**2)+(n**3))

Solution (Python):
a = int(input())
r = a + a*a + a**3
print(r)

Solution (Python):
def main(a):
    return a + a**2 + a**3

if __name__ == "__main__":
    a = int(input())
    print(int(main(a)))

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
b = a ** 3 + a ** 2 + a
print(b)

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(2 * 10**6)


def inpl():
    return list(map(int, input().split()))


def main():
    a = int(input())
    print(a + a**2 + a**3)
    return


if __name__ == '__main__':
    main()

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())

print(int(a + a*a + a*a*a))

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
n = int(input())
print(n + n * n + n * n * n)

Solution (Python):
a = int(input())
r = int(a + a ** 2 + a ** 3)
print(r)

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = input()
a = int(a)
b = a + a**2 + a**3
print(b)

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):
a = int(input())

print(a + pow(a, 2) + pow(a, 3))

Solution (Python):
def calc(a):
    return a+(a**2)+a**3

if __name__ == "__main__":
    a = int(input())
    print(calc(a))

Solution (Python):
a = int(input())
print(a + a ** 2 + a **3)

Solution (Python):


a = int(input())


ans = a + a**2 + a**3


print(ans)

Solution (Python):
a=int(input())
print(a+(a*a)+(a*a*a))

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):
a = int(input())

ansewr = a + a**2 + a**3

print(ansewr)

Solution (Python):
a=int(input())
ans=a+(a*a)+(a*a*a)
print(ans)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(int(a+a**2+a**3))

Solution (Python):
 
a = int(input())

print(int(a + a**2 + a**3))

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
n = int(input())
print(n + pow(n, 2) + pow(n, 3))

Solution (Python):
a = int(input())
print(a + (a ** 2) + (a ** 3))

Solution (Python):
n = int(input())
print(n+n**2+n**3)

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a * (1 + a + a * a))

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
n = int(input())
print(n+n*n+n*n*n)

Solution (Python):
N = int(input())

print(int(N+N**2+N**3))

Solution (Python):
val = int(input())

print(val + val ** 2 + val ** 3)

Solution (Python):
a = int(input())
print(int(a+a**2+a**3))

Solution (Python):
n=int(input())
print(n+n*n+n*n*n)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
x=int(input())
print(x+x**2+x**3)

Solution (Python):
a = int(input())
print(a + a ** 2 + a ** 3)

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
a=int(input())
ans=a+a**2+a**3
print(ans)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())

b=a+a*a+a*a*a

print(b)

Solution (Python):
a=int(input())
print(int(a+a**2+a**3))

Solution (Python):
import sys

n = int(sys.stdin.readline())
print(n+n**2+n**3)

Solution (Python):
import heapq as hq
def inp():
	return (int(input()))


def inlt():
	return (list(map(int,input().split())))


def insr():
	s=input()
	return (list(s[:len(s)]))


def invr():
	return (map(int,input().split()))


def subset_sum_count(arr,n,sum):
	dp=[[0 for _ in range(sum+1)] for _ in range(n+1)]
	for i in range(n+1):
		for j in range(sum+1):
			if j==0:
				dp[i][j]=1
			elif arr[i-1]<=j:
				dp[i][j]=dp[i-1][j-arr[i-1]]+dp[i-1][j]
			else:
				dp[i][j]=dp[i-1][j]
	return dp[n][sum]


def prefix(a):
	pre=[]
	pre.append(a[0])
	for i in range(1,len(a)):
		pre.append(pre[i-1]+a[i])
	return pre

def str_to_integer_list(n):
	a=[]
	for i in range(len(n)):
		a.append(int(n[i]))
	return a
def list_to_str(l):
	s=""
	for i in l:
		s+=str(i)
	return s
def binarySearch(arr,low,high,x):
	if (high>=low):
		mid=low+(high-low)//2
		if x==arr[mid]:
			return (mid)
		elif (x>arr[mid]):
			return binarySearch(arr,(mid+1),high,x)
		else:
			return binarySearch(arr,low,(mid-1),x)
	
	return -1


def right_shift(a,s):
	return a[s:]+a[:s]


def dijkstra(s,N,E):
	visited=set()
	dist={}
	for i in range(1,N+1):
		dist[i]=1<<29
	queue=[(dist[i],i) for i in range(1,N+1)]
	hq.heappush(queue,(0,s))
	dist[s]=0
	while queue:
		d,u=hq.heappop(queue)
		if u in visited:
			continue
		
		for t in E[u]:
			v,r=t
			if dist[v]>d+r:
				dist[v]=d+r
				hq.heappush(queue,(dist[v],v))
		
		visited.add(u)
	return dist


def path(start,end,parent):
	path=[end]
	while path[-1]!=start:
		path.append(parent[path[-1]])
	path.reverse()
	return path


def bfs(graph,start,end):
	parent={}
	queue=[]
	queue.append(start)
	while queue:
		node=queue.pop(0)
		if node==end:
			return path(start,end,parent)
		for next in graph.get(node,[]):
			if node not in queue:
				parent[next]=node
				queue.append(next)


'''for _ in range(int(input())):
	n,m=list(map(int,input().split()))
	graph=[[]for _ in range(n+1)]
	distance=[-1]*(n+1)
	visited=[False]*(n+1)
	for _ in range(m):
		x,y=list(map(int,input().split()))
		graph[x].append(y)
		graph[y].append(x)'''
'''T = int(input())
for i in range(0, T):
	N, M = map(int, input().split(' '))
	graph = {}
	for j in range(1, N+1):
		graph[j] = []
	for j in range(0, M):
		x, y, r = map(int, input().split(' '))
		graph[x].append((y,r))
		graph[y].append((x,r))'''
n=int(input())
res=n+n**2+n**3
print(res)

Solution (Python):
x = int(input())

print(x + (x**2) + (x**3))

Solution (Python):
a = int(input())
ans = a + a**2 + a**3
print(ans)

Solution (Python):

a = int(input()) 
print(a + a ** 2 + a ** 3)

Solution (Python):
def main():
    a = int(input())

    print(a+a**2 + a**3)
if __name__ == '__main__':
    main()

Solution (Python):
a = int(input())
print(int(a+a**2+a**3))

Solution (Python):
a = int(input())
print(a + a ** 2 + a ** 3)

Solution (Python):
from sys import stdin
a = int(stdin.readline().rstrip())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
print((a**3)+(a**2)+a)

Solution (Python):
a = int(input())

print(a + a**2 + a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

ans = a + (a*a) + (a*a*a)

print(ans)

Solution (Python):

a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
ans = int(a + a ** 2 + a ** 3)
print(ans)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())

print(a+a**2+a**3)

Solution (Python):
a=input()
print a+a**2 + a**3

Solution (Python):
a=int(input(" "))
sum=int(a+a**2+a**3)
print(sum)

Solution (Python):
a = int(input())
print(a+a*a+a**3)

Solution (Python):
inputNum = int(input())
print(inputNum + (inputNum ** 2) + (inputNum ** 3))

Solution (Python):

num = int(input())
ans = num + num ** 2 + num ** 3
print(ans)

Solution (Python):
N=int(input())
print(N+N**2+N**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())

n = a + a * a + a * a * a
print(n)

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())

print(a + a ** 2 + a ** 3)

Solution (Python):
a = int(input())

print(a+a*a+a*a*a)

Solution (Python):
a = int(input())
ans = a + a**2 + a**3
print(ans)

Solution (Python):
a = int(input())
Ans = a ** 3 + a ** 2 + a
print(Ans)

Solution (Python):
a = int(input())
print(a + (a ** 2) + (a ** 3))

Solution (Python):
n = int(input())
res = n+(n**2)+(n**3)
print(res)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + pow(a, 2) + pow(a, 3))

Solution (Python):


a = int(input())

print(int(a + (a ** 2) + (a ** 3)))

Solution (Python):
a=int(input())
print(int(a+a**2+a**3))

Solution (Python):
a = int(input())

print(int(a + a**2 + a**3))

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+a*a+a*a*a)

Solution (Python):

a = int(input())

print(a+(a**2)+(a**3))

Solution (Python):
a = int(input())
sum = a
sum += a*a
sum += a*a*a
print(sum)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())

print(a+a*a+a*a*a)

Solution (Python):


a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
i = int(input())
print(i + i**2 + i**3)

Solution (Python):
a = int(input())

print(a + a*a + a*a*a)

Solution (Python):
i = int(input())

print(i+i*i+i*i*i)

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())
ans = a + a**2 + a**3
print(ans)

Solution (Python):
a = int(input())

print(a + a*a + a*a*a)

Solution (Python):
a = int(input())

print(a + a * a + a * a * a)

Solution (Python):
a=int(input())
b=a+a**2+a**3
print(int(b))

Solution (Python):
a = int(input())
if a >= 1 and a <= 10:
    result = a + (a * a) + (a * a * a)
    print(result)
else:
    print()

Solution (Python):
a = int(input())
print(a+a*a+a*a*a)

Solution (Python):
a=int(input())
print(int(a+(a**2)+(a**3)))

Solution (Python):


a = int(input())
answer = a + a**2 + a**3
print(answer)

Solution (Python):
n = int(input())
print(int(n + n ** 2 + n ** 3))

Solution (Python):
N  = int(input())
ans = N+N**2+N**3
print(ans)

Solution (Python):
a = int(input())
b = a + a**2 + a**3
print(b)

Solution (Python):
a = int(input())

print(a + a*a + a*a*a)

Solution (Python):
a = int(input())
print(a + (a*a) + (a*a*a))

Solution (Python):
a = int(input())

res = a + a*a + a*a*a
print(res)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())

print(a + a ** 2 + a ** 3)

Solution (Python):
def main():
  a = int(input())
  print(a + a**2 + a**3)

if __name__ == "__main__":
  main()

Solution (Python):
a = int(input())
print(a+ a**2 + a**3)

Solution (Python):
a = int(input())
print(a + a ** 2 + a ** 3)

Solution (Python):
a = int(input())
print(a**3 + a**2 + a)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + a**2 + a ** 3)

Solution (Python):
n = int(input())
print(n+n**2+n**3)

Solution (Python):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

def main():
    
    a = int(input())
    print(a + (a**2) + (a**3))

if __name__ == "__main__":
    main()

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
n = int(input())
print(n+n**2+n**3)

Solution (Python):
a = int(input())
print(a + a ** 2 + a ** 3)

Solution (Python):

a = int(input())

print(a+a*a+a*a*a)

Solution (Python):
import sys


def main():
    input = sys.stdin.buffer.readline
    a = int(input())
    print(a + a ** 2 + a ** 3)


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
a=n+n**2+n**3
print(int(a))

Solution (Python):
a = int(input())
print(int(a+a**2+a**3))

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())

print(int(a+a**2+a**3))

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
n=int(input())

print(n+(n**2)+(n**3))

Solution (Python):
def _main(a):
    print(int(a + a ** 2 + a ** 3))


if __name__ == "__main__":
    _main(int(input()))

Solution (Python):
a = int(input())
print(a+pow(a,2)+pow(a,3))

Solution (Python):
a = int(input())

ans = a + (a**2) + (a**3)

print(ans)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
b=a+a**2+a**3
print(b)

Solution (Python):
a=int(input())

print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a*(1+a*(1+a)))

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
s = int(input())
print(s+s**2+s**3)

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(int(a+a**2+a**3))

Solution (Python):
a = int(input())

print(a+a**2+a**3)

Solution (Python):
n = int(input())

s = n + n*n + n*n*n

print(s)

Solution (Python):
a = int(input())
answer = a + a*a + a*a*a
print(answer)

Solution (Python):
a = int(input())
print(a+(a**2)+(a**3))

Solution (Python):
a = int(input())
print(a + a**2 + a**3)

Solution (Python):
a=int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(int(a+(a**2)+(a**3)))

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a=int(input())
print(a+(a**2)+(a**3))

Solution (Python):
a = int(input())
ans = a + a * a + a * a * a
print(ans)

Solution (Python):
a = int(input())
print(a + a ** 2 + a ** 3)

Solution (Python):
a = int(input())

ans = int(a + a**2 + a**3)

print(ans)

Solution (Python):
def main():
    a = int(input())
    print(a + a ** 2 + a ** 3)


if __name__ == '__main__':
    main()

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
production = True

import sys, math, collections

def input(input_format = 0, multi = 0):

    if multi > 0: return [input(input_format) for i in range(multi)]
    else:
        next_line = sys.stdin.readline()[:-1]

        if input_format >= 10:
            use_list = False
            input_format = int(str(input_format)[-1])
        else: use_list = True

        if input_format == 0: formatted_input = [next_line]
        elif input_format == 1: formatted_input = list(map(int, next_line.split()))
        elif input_format == 2: formatted_input = list(map(float, next_line.split()))
        elif input_format == 3: formatted_input = list(next_line)
        elif input_format == 4: formatted_input = (lambda x: [x[0], list(map(int, x[1:]))])(next_line.split())
        elif input_format == 5: formatted_input = (lambda x: [x[0], list(map(float, x[1:]))])(next_line.split())
        elif input_format == 6: formatted_input = next_line.split()
        else: formatted_input = [next_line]

        return formatted_input if use_list else formatted_input[0]


def out(output_line, output_format = 0, newline = True):

    formatted_output = ""

    if output_format == 0: formatted_output = str(output_line)
    elif output_format == 1: formatted_output = " ".join(map(str, output_line))
    elif output_format == 2: formatted_output = "\n".join(map(str, output_line))

    print(formatted_output, end = "\n" if newline else "")


def log(*args):
    if not production:
        print("$$$", end = "")
        print(*args)

enum = enumerate






def solve():

    n = input(11)
    a = n + n ** 2 + n ** 3

    out(a)

    return



solve()

Solution (Python):
n=int(input())
print(n*(1+n+n*n))

Solution (Python):
n=int(input())
print(int(n+n**2+n**3))

Solution (Python):
a = int(input())
print(a+a**2+a**3)

Solution (Python):
a = int(input())
print(a + a*a +a*a*a)

Solution (Python):
a = int(input())
print(a + a ** 2 + a ** 3)

Solution (Python):
a=int(input())
print(int(a+a**2+a**3))

Solution (Python):
a = int(input())
print(a + a ** 2 + a ** 3)