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

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

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

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

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

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

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

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

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

import sys
input = sys.stdin.readline
a = int(input())
ans =a +a**2 +a**3
print(ans)

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

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

Solution (Python):


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

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

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

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

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

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

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

Solution (Python):
import math



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

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

Solution (Python):

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

if __name__ == "__main__":
  resolve()

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

Solution (Python):
from math import *

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

Solution (Python):

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


if __name__ == "__main__":
    main()

Solution (Python):


import sys

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

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()


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

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

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

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

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

Solution (Python):

s=int(input())

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

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

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

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

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

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

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

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

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

Solution (Python):


import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

a = int(readline())

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

Solution (Python):

import sys

input = sys.stdin.readline


def S():
    return input().rstrip()


def I():
    return int(input())


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


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

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

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

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

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

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

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

Solution (Python):
from sys import stdin
a = int(stdin.readline().rstrip())

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

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

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

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

Solution (Python):


import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

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


if __name__ == "__main__":
    resolve()

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

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

Solution (Python):
a  = [int(v) for v in input().split()][0]
print(str(a+a**2+a**3))

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

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

if __name__ == "__main__":
    main()

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

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

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

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

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

if __name__ == "__main__":
    main()

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*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):
'''
.append(要素) リストに要素を追加
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前

sort()
sorted(reverse=true)

配列の初期化
配列名=[a]*n+[b]*m

Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
from functools import reduce
from operator import mul
from collections import Counter
import itertools
import fractions
import sys

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
from decimal import Decimal
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


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

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

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

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

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

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

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

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

print(n+a2+a3)

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

main()

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

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

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

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

Solution (Python):


a=int(input())

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

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

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

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

    return a + a * a + a * a * a

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(int(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):
import queue
from math import floor
from decimal import Decimal

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

Solution (Python):
import sys
import numpy as np
import math
import collections
from collections import deque 
from functools import reduce



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):
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):
def resolve():
    inp = input()
    a = int(inp)

    r = a**3+a**2+a

    print(r)

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

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

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

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

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

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

Solution (Python):


def main():
    A = int(input())
    print(A+pow(A,2)+pow(A,3))




if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    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):
from sys import stdin
a = int(stdin.readline())
print(a+a**2+a**3)

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

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

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

if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
import sys
import math
import itertools as it
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":
    a = I()
    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())
b=a+a**2+a**3
print(b)

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

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

print(ans)

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

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

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    a = int(input())
    print(a+a**2+a**3)
if __name__ == '__main__':
    main()

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

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

Solution (Python):

from sys import stdin
input = stdin.readline

a = int(input())

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

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

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

Solution (Python):










import sys

def input(): return sys.stdin.readline()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip("\n") for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]

def OutH(lst): print(*lst)
def OutV(lst): print(*lst, sep="\n")

sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)


a = iIn()

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


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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

a = int(input())

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

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

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

Solution (Python):


import sys
read = sys.stdin.read
readline = sys.stdin.readline

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

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

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

Solution (Python):
inpl = lambda: list(map(int,input().split()))
a = int(input())
print(a + a*a + a*a*a)

Solution (Python):
'''
Created on 2020/06/27

@author: harurun
'''
a = int(input())
print(a+a**2+a**3)

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

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

print(ans)

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

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

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

ans = a + pow(a, 2) + pow(a, 3)

print(ans)

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

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

Solution (Python):


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

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

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

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

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

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

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

Solution (Python):



import sys


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


def resolve():
    a = int(input().rstrip())

    print(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):
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())
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):
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**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().strip())
print(a + pow(a, 2) + pow(a, 3))

Solution (Python):
import math
from collections import Counter

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):
import sys
from io import StringIO
import unittest
import os


sys.setrecursionlimit(999999999)



def resolve(test_def_name=""):
    a = int(input())

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



class TestClass(unittest.TestCase):
    def assertIO(self, assert_input, output):
        stdout, sat_in = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
        resolve(sys._getframe().f_back.f_code.co_name)
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, sat_in
        self.assertEqual(out, output)

    def test_input_1(self):
        test_input = """2"""
        output = """14"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """10"""
        output = """1110"""
        self.assertIO(test_input, output)

    
    def tes_t_1original_1(self):
        test_input = """データ"""
        output = """データ"""
        self.assertIO(test_input, output)



if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        
        resolve()

    else:
        
        unittest.main()

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


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


if __name__ == '__main__':
    main(sys.stdin.readline, print)

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

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

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

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

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


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


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


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


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')

def main():
    a = I()
    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**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*a+a*a*a)

Solution (Python):
import sys

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

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