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())
print(a + a**2 + a**3)

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

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

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

print(ans)

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

sum=a+a**2+a**3

print(sum)

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

result = a*(1+a*(1+a))

print(result)

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

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

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):
a = int(input())
print (a+a**2+a**3)

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

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

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=input()
a=int(a)
print(a+a*a+a*a*a)

Solution (Python):
import sys
input = sys.stdin.readline


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

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

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

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

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

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())
result = a + a**2 + a**3
print(result)

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

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

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

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

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

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):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

x = int(read())
print(x + x * x + x * x * x)

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

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

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

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

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())


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


if __name__ == "__main__":
    main()

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

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

print(I+I**2+I**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())
b= a+a*a+a*a*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):
a = int(input())
ans = a + a**2 + a**3
print(int(ans))

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

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

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

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

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

Solution (Python):

import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def main():
    
    
    

    a = int(input())

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


if __name__ == '__main__':
    main()

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

print(b)

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

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

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):
num = int(input())

print(num + num ** 2 + num **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):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)

def main():
    a = I()
    print(a + a * a + a * a * a)
    

main()

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**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())
print(a+a**2+a**3)

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

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

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

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

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

print(int(ans))

Solution (Python):

n = int(input());

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

Solution (Python):








import sys


a = int(sys.stdin.readline())

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*a+a*a*a)

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

Solution (Python):

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

Solution (Python):
a=input()
a=int(a)
a=a+a**2+a**3
print(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())
 


'''

'''
'''
n = input()
a = [int(input()) for i in range(n)]
'''
'''
n,m = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(m)]
'''
 



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

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

print(result)

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):
def calc(num):
    return num+(num**2)+(num**3)

def start():
    num = int(input())
    print(calc(num), end="")

start()

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())
x = a+(a*a)+(a*a*a)
print(x)

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):
n = int(input())
sum = 0

for i in range(1,4):
    t = n**i
    sum = sum + t
print(sum)

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

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):
a=int(input(""))

b=a*a
c=a*a*a

print(a+b+c)

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

Solution (Python):

"""Untitled36.ipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/1gX7akkWvXDnBU_uBNQLjSb2ijX28_WpH
"""

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 + 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=input()

a1=int(a)

b=a1+(a1*a1)+(a1*a1*a1)

print(b)

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):
a = int(input())
print(a + a*a + a*a*a)

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

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

Solution (Python):
a = input()

if 1 <= int(a) <= 10:
    print(int(a) + int(a)**2 + int(a)**3)
else:
    print('incorrect')

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

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

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

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())
tot=a+a**2+a**3

print(int(tot))

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**3)

Solution (Python):

"""
Created on Sat Jun 27 20:54:06 2020

@author: naoki
"""

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 = int(a + a**2 + a**3)
print(ans)

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

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

Solution (Python):
a=int(input(""))
if((a!=0)&(a<=10)):
    a=a+a*a+a*a*a
    print(a)

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

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    a = II()
    print(a + a**2 + a**3)


if __name__ == '__main__':
    solve()

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*a+a*a*a)

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

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

answer = a + a ** 2 + a ** 3

print(answer)

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

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

n=2
i=3
b = a+a ** n+a ** i
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):
n=int(input())
n1=n**2
n2=n**3
print(n+n1+n2)

Solution (Python):
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
print(N+N**2+N**3)

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

Solution (Python):
n=int(input())
print(int(n+n**2+n**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):
import sys

if __name__ == '__main__':
    a = int(sys.stdin.readline())
    print(a+(a**2)+(a**3))

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

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
a = input()
print(int(a) + pow(int(a),2) + pow(int(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):
def main():
    a = int(input())

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

if __name__ == "__main__":
    main()

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**2 + a**3)

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

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):
def main():
  a = int(input())
  print(a + a**2 + a**3)

main()

Solution (Python):

import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

n = inp()
print(n+ n*n + n*n*n)

Solution (Python):
a = int(input())
print(a**2 + a + 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 + n**2 + n ** 3)

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

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

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

print(ans)

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

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):
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):
import sys

a = int(input())

if (a<1)or(10<a):
    sys.exit(0)

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 calculate(s: int):
    print(s + s**2 + s**3)

s = int(input())
calculate(s)

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 = input()
print(str(int(a) + int(a)**2 + int(a)**3))

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

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());
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 + 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 ** 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):
t = int(input())
print(t+t**2+t**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 math
n = int(input())
ans = n + n**2 + n**3

print(math.floor(ans))

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

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*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(int(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):
a = int(input())

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

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

Solution (Python):
x=int(input())
s=0
for i in range(1,4):
	s=s+(x**i)
print(s)

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 (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())
z = a + a*a + a*a*a
print(z)

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

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):
int = int(input())
print(int+int*int+int*int*int)

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())
res = a + a ** 2 + a ** 3
print(res)

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

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

aa = a * a
aaa = aa * a
print(a + aa + aaa)

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())
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())
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(int(s))

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

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

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

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*a+a**3)

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

Solution (Python):
import sys


import math


input = sys.stdin.readline
import numpy as n



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

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





    

if __name__ == "__main__":
    main()

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())
a = a+ a*a + a*a*a
print (a)

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

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

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

if __name__=='__main__':
  print(main())

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

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

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

Solution (Python):
A = int(input())
def Main(A):
    return A + A**2 + A**3

print(Main(A))

Solution (Python):
x = int(input())
print(x+x*x+x*x*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())
b = a ** 2
c = a ** 3
d = a + b + c

print(d)

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())
print(a + a**2+a**3)

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

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

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())
x = a*a 
y = a*a*a
z =a+x+y

print(z)

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

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

Solution (Python):
num=int(input())
print(num+num**2+num**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+a**2+a**3)

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())
print(a+a*a+a*a*a)

Solution (Python):
a = int(input())
print(a**3 + a**2 + 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):
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    a=I()
    print(a+a**2+a**3)

main()

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

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

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

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

print(ans)

Solution (Python):
a = int(input())
print(int(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 + A**2 + A**3)

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

Solution (Python):
from sys import stdin

c = stdin.readline().rstrip()
a = int(c)
res = a+pow(a,2)+pow(a,3)
print(res)

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())

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())
a = a + a**2 +a**3
print(a)

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*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())
x=n+n**2+n**3
print(x)

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(a+a**2+a**3)

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

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

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+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**2+a**3)

Solution (Python):
import sys
input=sys.stdin.readline

a=int(input().rstrip('\n'))
print(a+a**2+a**3)

Solution (Python):

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

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

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

print(result)

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

if __name__ == '__main__':
    main()

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):
def ABC172_A():
    import math
    a = int(input())
    print(a+pow(a,2)+pow(a,3))


ABC172_A()

Solution (Python):
a=int(input())
B=0
C=0
D=0
B=a
C=a*a
D=a*a*a
print(B+C+D)

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

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


if(__name__ == '__main__'):
  main()

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

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

n = int(stdin.readline().rstrip())
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**2 + a**3)

Solution (Python):

a = int(input())

print(int(a*((a+1)**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())
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):





x = int(input())

ans = x + x**2 + x**3

print(ans)

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

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

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*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(int(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(a+a**2+a**3)

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

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

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

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

Solution (Python):
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    a = int(input())
    ans = 0
    for i in range(3):
        ans += a**(i+1)
    print(ans)


if __name__ == '__main__':
    main()

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):
num = int(input())
print(num+num**2+num**3)

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

Solution (Python):
"""everything has a cost!"""

from math import *
import random, functools, collections, sys

__author__ = 'p7x'







if __name__ == '__main__':
    n = int(input())
    print(n + n**2 + n**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**3+a**2+a)

Solution (Python):
import sys, io, os, re
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from pprint import pprint
from math import sin, cos, pi, radians, sqrt, floor, ceil
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce
from itertools import groupby
from heapq import heapify, heappush, heappop



n1 = lambda: int(sys.stdin.readline().strip())
nn = lambda: list(map(int, sys.stdin.readline().strip().split()))
f1 = lambda: float(sys.stdin.readline().strip())
fn = lambda: list(map(float, sys.stdin.readline().strip().split()))
s1 = lambda: sys.stdin.readline().strip()
sn = lambda: list(sys.stdin.readline().strip().split())
nl = lambda n: [n1() for _ in range(n)]
fl = lambda n: [f1() for _ in range(n)]
sl = lambda n: [s1() for _ in range(n)]
nm = lambda n: [nn() for _ in range(n)]
fm = lambda n: [fn() for _ in range(n)]
sm = lambda n: [sn() for _ in range(n)]

def array1(n, d=0): return [d] * n
def array2(n, m, d=0): return [[d] * m for x in range(n)]
def array3(n, m, l, d=0): return [[[d] * l for y in xrange(m)] for x in xrange(n)]
def linc(A, d=1): return map(lambda x: x + d, A)
def ldec(A, d=1): return map(lambda x: x - d, A)

a = n1()

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

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

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

Solution (Python):
"""
AtCoder :: Beginner Contest 172 :: A :: Calc
https://atcoder.jp/contests/abc172/tasks/abc172_a
"""
import sys


def solve(a):
    """
    Solve puzzle.
    Return a + a^2 + a^3
    """
    return a + pow(a, 2) + pow(a, 3)


def main():
    """Main program."""
    a = int(sys.stdin.readline())
    print(solve(a))


if __name__ == '__main__':
    main()

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*a+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**3 + a**2 + a)

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

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=0
for i in range(1,4):
  n+=pow(a,i)
print(n)

Solution (Python):
import numpy as np
import sys
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):
from queue import LifoQueue


def print_sol(c, sol):
    print('Case 


def rd_int():
    return int(input())


def rd_str():
    return input()


def rd_str_lst():
    return input().split(' ')


def sp_str_lst():
    return list(input())


def rd_int_lst():
    return [int(i) for i in rd_str_lst()]


def sp_int_lst():
    return [int(i) for i in sp_str_lst()]


def dfs(g, i, v):
    """
    recursive post order dfs
    Args:
        g: array of graph nodes
        i: node to traverse
        v: visited array

    Returns: a post order dfs of graph g
    """
    v[i] = True
    for j in g[i]:
        if not v[j]:
            dfs(g, j, v)

    print(i)


def dfs_iter(g, i, n):
    v = [False] * n
    stack = LifoQueue()
    stack.put(i)
    while stack.not_empty:
        u = stack.get()
        v[u] = True
        print(u)
        for i in g[u]:
            if not v[i]:
                stack.put(i)


def main():
    a = rd_int()
    a2 = a * a
    a3 = a2 * a
    print(a + a2 + a3)


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):
a=int(input(" "))
sum=int(a+a**2+a**3)
print(sum)

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline

a = int(input())

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

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

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