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

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

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

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

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

Solution (Python):

def main():

    numero = int(input())
    suma = 0
    for i in range(1, 4):

        suma = suma + numero**i

    print(suma)

if __name__ == "__main__":
    main()

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

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

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


if __name__ == '__main__':
    main()

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

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

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

print(ans)

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a = I()

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


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

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

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

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

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

Solution (Python):
"""
    Satwik_Tiwari ;) .
    4th july , 2020  - Saturday
"""



from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase


import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter  
from itertools import combinations as comb 
from itertools import permutations as permutate
from bisect import bisect_left as bl


from bisect import bisect_right as br
from bisect import bisect





BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)






mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") 
def out(var): sys.stdout.write(str(var))  
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())

def zerolist(n): return [0]*n
def nextline(): out("\n")  
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) : 
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True



def bs(a,l,h,x):
    while(l<h):
        
        mid = (l+h)//2
        if(a[mid] == x):
            return mid
        if(a[mid] < x):
            l = mid+1
        else:
            h = mid
    return l

def sieve(a): 
    
    for i in range(3,((10**6)+1),2):
        a[i] = 1
    
    for i in range(3,((10**6)+1),2):
        for j in range(i*i,((10**6)+1),i):
            a[j] = 0
    a[2] = 1 
    return (a)


def bfs(g,st):
    visited = [-1]*(len(g))
    visited[st] = 0
    queue = []
    queue.append(st)
    new = []
    while(len(queue) != 0):
        s = queue.pop()
        new.append(s)
        for i in g[s]:
            if(visited[i] == -1):
                visited[i] = visited[s]+1
                queue.append(i)
    return visited


def dfsusingstack(v,st):
    d = deque([])
    visited = [0]*(len(v))
    d.append(st)
    new = []
    visited[st] = 1
    while(len(d) != 0):
        curr = d.pop()
        new.append(curr)
        for i in v[curr]:
            if(visited[i] == 0):
                visited[i] = 1
                d.append(i)
    return new



def solve():
    n = int(inp())
    ans = 0
    for i in range(1,4):
        ans+=n**i
    print(ans)


testcase(1)

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

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

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

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

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

Solution (Python):

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

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

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

Solution (Python):
a = int(input())
print(f'{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())

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

print(ans)

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

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

Solution (Python):

s = raw_input()
s = int(s)

print s + s ** 2 + s ** 3

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

Solution (Python):

ret = [3,14,39,84,155,258,399,584,819,1110]

s = int(input())
print(ret[s-1])

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

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

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

Solution (Python):

n = int(input())

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

val = num + num **2 + num **3

print(val)

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

ans = num + num**2 + num**3

print(int(ans))

Solution (Python):
import time
a=int(input())
time.sleep(1.975)
print(a+a*a+a*a*a)

Solution (Python):
import time
a=int(input())
time.sleep(1.972)
print(a+a*a+a*a*a)

Solution (Python):
import time
a=int(input())
time.sleep(1.971)
print(a+a*a+a*a*a)

Solution (Python):
import time
a=int(input())
time.sleep(1.97)
print(a+a*a+a*a*a)

Solution (Python):
import time
a=int(input())
time.sleep(1.7)
print(a+a*a+a*a*a)

Solution (Python):
import time
a=int(input())
time.sleep(1)
print(a+a*a+a*a*a)

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

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

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

print(x)

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

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

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

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

Solution (Python):
import sys

def main():

	i = int(input())
	
	print(i+i*i+i*i*i)
	
if __name__ == "__main__":
    main()

Solution (Python):

a = int(input())

print("{}".format(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=input()
A=int(A)
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):
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


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


main()

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


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

ans = 0
for i in [1, 2, 3]:
    ans += a ** i

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

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

Solution (Python):
import sys

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

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

Solution (Python):
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007

inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

def bo(i):
    return ord(i)-ord('a')

file = 1

def solve():
    



    

    a=ii()
    print(a+a*a+a*a*a)        
        








  
















if __name__ =="__main__":

    if(file):

        if path.exists('input1.txt'):
            sys.stdin=open('input1.txt', 'r')
            sys.stdout=open('output1.txt','w')
        else:
            input=sys.stdin.readline
    solve()

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

Solution (Python):

import sys


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()
    print(N+N**2+N**3)




main()

Solution (Python):

import sys


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()
    print(N+N**2 + N**3)




main()

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

Solution (Python):


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

Solution (Python):


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

Solution (Python):



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

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

Solution (Python):

import sys


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()
    print(N+N**2 + N**3)




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

print(result)

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

Solution (Python):
a = int(input())
print("{}".format(a**3 + a**2 + a))

Solution (Python):

import sys


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()
    print(N + N**2 + N**3)


main()

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

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

Solution (Python):



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


main()

Solution (Python):



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


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

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())
b = a**2
c = a**3

print(a+b+c)

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

Solution (Python):
a = int(input())
ans = 0
for i in range(3):
  ans += a**(i+1)
print(ans)

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

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

print(ans)

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

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

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

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

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

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

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

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

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

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

if __name__=="__main__":
    input = input()
    print(func(int(input)))

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



from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush, heapify
from fractions import gcd

sys.setrecursionlimit(10**8)
mod = 10**9+7
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 inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    n = inp()
    print(n+n**2+n**3)
        
if __name__ == "__main__":
    main()

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

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

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

print(ans)

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

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

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

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

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

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

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

Solution (Python):
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
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*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())
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())
print(a+a*a+a*a*a)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

reslut = pow(a,1) + pow(a,2) + pow(a,3)
print(reslut)

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

Solution (Python):

import math
import collections
import bisect


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

print(ans)

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

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

print(ans)

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

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

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

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

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

print( i + i**2 + i ** 3)

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

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

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

a2 = pow(a, 2)
a3 = pow(a, 3)

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

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

Solution (Python):

a = input()

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

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

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

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**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 resolve():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip())

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

if __name__ == "__main__":
    resolve()

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


if __name__=="__main__":
  main()

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

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

if __name__ == "__main__":
	resolve()

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

if __name__ == "__main__":
    resolve()

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

if __name__ == "__main__":
	resolve()

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 collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    a = gete(int)

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

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 calc(x):
    return x+ x * x * x + x * x

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

Solution (Python):


import math


def main():
    a = int(input())
    res = a + math.pow(a, 2) + math.pow(a, 3)
    print(int(res))


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
p = N
for i in range(2):
    p = N*(1+p)
print(p)

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

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

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

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

Solution (Python):
import math

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

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

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

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

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

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

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

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

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

Solution (Python):
def calculus(a):
    b = 1 + a
    c = b*a + 1
    return a*c

a = int(input())
print(calculus(a))

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

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