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

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

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

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

print(d + d**2 + d**3)

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

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

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

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 * 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):
from sys import stdin
input = stdin.readline


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







if __name__ == '__main__':
    solve()

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

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

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

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

print(A)

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

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

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

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

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

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 sep():
    return map(int,input().strip().split(" "))
def lis():
    return list(sep())

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

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

sum = a + (a*a) + (a*a*a)
print(sum)

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

n = n + n ** 2 + n ** 3

print(n)

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

Solution (Python):


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

print(int(ans))

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+1))

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

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a = int(readline())
    print(a + a ** 2 + a ** 3)


if __name__ == '__main__':
    solve()

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 re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 6)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()

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

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 + pow(a,2) + pow(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):
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())

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

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

ans = 0

for i in range(1, 4):
    ans += (a ** i)

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):
import sys, bisect, math, itertools, string, queue, copy





def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplt(n): return [tuple(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

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

Solution (Python):
import sys

a = int(input())
print('hello', file=sys.stderr)
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):

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

Solution (Python):
def main(a):
    return ((a + 1)*a + 1)*a

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

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

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

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

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

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

Solution (Python):
N = int(input().rstrip())
N_2=pow(N,2)
print(N*(1+N+N_2))

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

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

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

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

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

Solution (Python):
a=int(input());print(a-~a*a**2)

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

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

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

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

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

Solution (Python):


a = int(input().split()[0])
ans = int(a + a ** 2 + a ** 3)

print(ans)

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

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

if '__main__' == __name__:
    resolve()

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

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

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

Solution (Python):
def solve(string):
    a = int(string)
    return str(a + a**2 + a**3)                                                                                         

if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    a = int(input())
    print(a+a**2+a**3)

if __name__=='__main__':
    main()

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()
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())

A = a
B = pow(a,2)
C = pow(a,3)

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

Solution (Python):

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

if __name__ == "__main__":
    main()

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

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

Solution (Python):
import math
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")


a = I()
ans = a * (1+a+a**2)

print(ans)

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

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

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

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

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

print(l)

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

Solution (Python):
if __name__ == "__main__":
    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):
n = int(input())
nn = n**2
nnn = n**3
print(n+nn+nnn)

Solution (Python):
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+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 * (a + 1) + 1)))

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

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

print(ans)

Solution (Python):
import math
a = int(input())
print(a + int(math.pow(a, 2)) + int(math.pow(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())
a = a//1
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):
num = int(input())

print(num + num ** 2 + num ** 3)

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):

import sys
sys.setrecursionlimit(1000000)
from collections import deque


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

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

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

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

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())
if a == 1:
  print(3)
else:
  print(int((a**3-1)*a/(a-1)))

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
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())

b = a+a**2+a**3

print(b)

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

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

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

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

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

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

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

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

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

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

Solution (Python):

import sys
from itertools import chain





def solve(a: int):
    return a + a*a + a*a*a

def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    a = int(next(tokens))  
    answer = solve(a)
    print(answer)

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

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

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

if __name__ == "__main__":
    solve()

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

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

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

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

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

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

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

Solution (Python):
a = int(input())
ans = 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())

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

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

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

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

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

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

Solution (Python):
func = lambda a: a+a**2+a**3
print(func(int(input().rstrip())))

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

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

import sys
input = sys.stdin.readline

def inp():
    return(int(input()))



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

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=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(a+pow(a,2)+pow(a,3))

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

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

print(a + 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):
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().split())
inl = lambda: list(map(int, input().split()))

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

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

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

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

Solution (Python):
import sys
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)
exit()

Solution (Python):
a = int(input())
a2 = a * a
a3 = a2 * a

print(a + a2 + a3)

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

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

Solution (Python):
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 * (1 + a * (1 + a)))

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

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**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 math

import itertools
from collections import deque
from collections import Counter
import heapq


import bisect
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):
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())
print(str(x**3 + x**2 + x ))

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

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

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

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

out = int(A + A**2 + A**3)

print(out)

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

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

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

ans = 0
for i in range(3):
    ans += a**(i+1)

print(ans)

Solution (Python):
from sys import stdin
input = stdin.readline
ri = lambda : int(input())
ril = lambda : list(map(int, input().split()))

def main():
  a = ri()
  a = a * (a * (a + 1) + 1)
  print(a)


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

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

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

for i in range(1, 4):
    ans += a**i

print(ans)

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

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

for i in range(1, 4):
    ans += a**i

print(ans)

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

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

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

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

if __name__ == '__main__':
    Qa()

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

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