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

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

print(solution)

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

print(n + pow(n,2)+pow(n,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**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 numpy as np

def S(): return sys.stdin.readline().rstrip().split(' ')
def Ss(): return list(S())
def I(): return _I(Ss())
def Is(): return list(I())
def _I(ss): return map(int, ss) if len(ss) > 1 else int(ss[0])

a = I()
print(a + a*a + a*a*a)

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

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

Solution (Python):
def main(istr, ostr):
    a = int(istr.readline())
    print(a + a * (a + a * a), file=ostr)


if __name__ == "__main__":
    import sys

    main(sys.stdin, sys.stdout)

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

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



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

x = a + a**2 + a**3

print(x)

Solution (Python):




n = int(input())



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

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

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

print("{}".format(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**2+a**3)

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

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

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

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

Solution (Python):
def resolve():
    a = int(input())
    print(sum([a, a*a, a*a*a]))

if __name__ == "__main__":
    resolve()

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 calculation(lines):
    a = int(lines[0])
    lines_result = list()
    lines_result.append(a+a**2+a**3)
    return lines_result



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2']
        lines_export = [14]
    if pattern == 2:
        lines_input = ['10']
        lines_export = [1110]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode



def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

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

Solution (Python):

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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


def main():
    solve()


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

Solution (Python):
import sys
a = int(input())
if not ( 1 <= a <= 10 ): sys.exit()
if not isinstance(a,int): sys.exit()

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


def main():

    a = int(input())

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

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
if __name__ == "__main__":
    a=input()
    a=int(a)
    ans=a+a*a+a*a*a
    print(ans)

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

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

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

Solution (Python):
a = int(input())
print(str(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):
import math
import sys
from collections import Counter
readline = sys.stdin.readline


def main():
    a = int(readline().rstrip())

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


if __name__ == '__main__':
    main()

Solution (Python):


from typing import *
import itertools
import math
import sys

INF = float('inf')


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


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  
    print(solve(a))


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

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

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

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

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

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

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

Solution (Python):
a = int(input())
ans = 0
for i in range(1, 4):
    ans = ans + a**i
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())
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(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(str(a + a*a + a*a*a))

Solution (Python):
a = int(input())
print(str(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())
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 ** 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
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy
 

 










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

Solution (Python):
from sys import stdin
import sys

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

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

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

Solution (Python):
a = int(input())
print(f'{a+a**2+a**3}')

Solution (Python):
class tasi:

    def sum1(self,a):
        total = 0

        for i in range(3):
            total += a ** (i + 1)
    
        print(total)


a = int(input())
m = tasi()
m.sum1(a)

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def a172(a):
 
    return a + a**2 + a**3
 
def main():
    a = int(input())
    print(a172(a))
 
if __name__ == '__main__':
    main()

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

Solution (Python):
def a172(a):

    return a + a**2 + a**3

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
""" Atcorder practice 20200719 """



def __main__():
    """ def for calc """
    num_input = int(input())
    if num_input < 1 or num_input > 10:
        raise ValueError
    
        
    else:
        print(num_input + num_input**2 + num_input**3)


if __name__ == "__main__":
    __main__()

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

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

Solution (Python):
a=int(input())
import math
print(math.floor(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=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):
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())
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())
sum_a = a + a**2 + a**3
print(sum_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())
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):
a = int(input())

class calculate:
    def __init__(self,a):
        self.check = a
    
    def get_ans(self,a):
        return a + a**2 + a**3

valuable = calculate(a)



ans = valuable.get_ans(a)

print(ans)

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

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

print(ans)

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do(): 
    a=INT()
    print(a+a**2+a**3)
if __name__ == '__main__':
    do()

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

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

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

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

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

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

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

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

Solution (Python):
def calc():
    
    a = int(input())
    
    result = 0
    for i in range(1,4):
        result += a ** i
    
    print(result)

calc()

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

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

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

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

print(ans)

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

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

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

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


def input(): return sys.stdin.readline().strip()


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

Solution (Python):
if __name__ == '__main__':
	
	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 + a**2 + a**3)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):

import sys


def solve(a: int):
    poly = a + a**2 + a**3
    return poly



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  
    print(solve(a))

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*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):
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):
n = int(input())
a = [n,n**2,n**3]
print(sum(a))

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

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

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

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

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

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

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

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

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

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

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

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

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

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

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

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

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

Solution (Python):
import math

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

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

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

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

Solution (Python):
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

a = I()

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

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

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

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


print(u)

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

u=int(n+n**2+n**3)

print(u)

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

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

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

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

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

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

Solution (Python):
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
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)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

a = I()

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

print(ans)

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

Solution (Python):
import itertools
import math
import fractions
import functools
import copy
from collections import deque
from functools import reduce
from decimal import Decimal


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

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