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

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

if __name__ == '__main__':
    solve()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

print(int(ans))

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

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

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

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

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

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

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

answer = 0
for i in range(3):
  answer += a ** (i+1)
  
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())

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

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(sys.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(sum((a ** i) for i in range(1,4)))

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

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

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

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

Solution (Python):
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
from math import cos,sin,tan,sqrt
import cmath as cma
import copy as cp
import sys
import re
sys.setrecursionlimit(10**7)
EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf
MOD = 10**9 + 7

def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def adj(n): return [[] for _ in range(n)]

class unionfind():
    def __init__(self, n):
        self.n = n
        
        self.parents = [-1] * n
    def find(self, x):
        if self.parents[x] < 0: return x
        self.parents[x] = self.find(self.parents[x])
        return self.parents[x]
    def union(self, x, y):
        x,y = self.find(x), self.find(y)
        if x == y: return
        if self.parents[x] > self.parents[y]: x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x
    def size(self, x): return -self.parents[self.find(x)]
    def same(self, x, y): return self.find(x) == self.find(y)
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
    def roots(self): return [i for i, x in enumerate(self.parents) if x < 0]
    def group_count(self): return len(self.roots())

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

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

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

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

Solution (Python):
import sys







input = sys.stdin.readline
sys.setrecursionlimit(10**7)
inf = 10**17
mod = 10**9 + 7

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

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

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

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

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
a = I()
print(a+a**2+a**3)

Solution (Python):
import sys


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


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


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


if __name__ == "__main__":
    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)


if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):
ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))


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

if __name__ == "__main__":
    resolve()

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

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

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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	a = inputInt()

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





if __name__ == "__main__":
	main()

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

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

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

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

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

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

Solution (Python):
a = int(input())
b = [0,0,0]
b[0] = a
b[1] = b[0]*a
b[2] = b[1]*a
total = sum(b)
print(total)

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

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):
a = int(input())
b = [3, 14, 39, 84, 155, 258, 399, 584, 819, 1110]
print(b[a-1])

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

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

print(round(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):




def input_int():
    return int(input())



def int1(x):
    return int(x) - 1



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



def input_to_int_tuple():
    return tuple(map(int, input().split()))



def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


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

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


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

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

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

print(ans)

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

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

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

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

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

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

Solution (Python):

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

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

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

print(str(ans))

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

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

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

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

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

Solution (Python):
import sys

input_data = []
input_pointer = 0

output_data = []

def input_scan():
    global input_data
    input_data = sys.stdin.readlines()
    input_data = [x[:-1] for x in input_data]

def next_line():
    global input_pointer
    global input_data
    if input_pointer < len(input_data):
        input_pointer += 1
        return input_data[input_pointer - 1]
    else:
        return ""

def append_output(string):
    global output_data
    output_data.append(string)

def print_output():
    global output_data
    output_data.append("")
    sys.stdout.write("\n".join(output_data))

a = int(input())
append_output(str(a + a * a + a * a * a))
print_output()

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

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

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

Solution (Python):
a = int(input())
print(sum(a**i for i in range(1, 4)))

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

Solution (Python):

"""
Created on Sun Jun 28 13:26:25 2020

@author: NEC-PCuser
"""
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**2 + 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):
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):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



a = I()

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

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

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

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

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

Solution (Python):
import sys

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

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

solve()

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



if __name__ == "__main__":
    main()

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

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

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

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():
    import sys
    a=int(sys.stdin.readline())
    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):


def get_input() -> int:
    """
    標準入力を取得.

    Returns:\n
        int: 標準入力
    """
    a = int(input())

    return a


def main(a: int) -> None:
    """
    メイン処理.

    Args:\n
        a (int): 整数（1 <= a <= 10）
    """
    
    ans = a + a**2 + a**3

    
    print(ans)


if __name__ == "__main__":
    
    a = get_input()

    
    main(a)

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

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):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce, lru_cache  
from fractions import gcd
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(int(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 * a + a * a * a)

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

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

import sys
sys.setrecursionlimit(10**8)
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))


INF = float("inf")
MOD = 10**9 + 7


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

    return


if __name__ == '__main__':
    main()

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

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

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

import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))

def main():
    sys.setrecursionlimit(10**8)
    INF = float("inf")

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


if __name__ == '__main__':
    main()

Solution (Python):

import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))

def main():
    sys.setrecursionlimit(10**8)
    INF = float("inf")

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


if __name__ == '__main__':
    main()

Solution (Python):

import sys
sys.setrecursionlimit(10**8)
INF = float("inf")


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


def INT():
    return int(input())


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


def LIST():
    return list(map(int, input().split()))


def ZIP(n):
    return zip(*(MAP() for _ in range(n)))


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


if __name__ == '__main__':
    main()

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

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

for i in range(1,4):
  ans += n**i
else:
  print(ans)

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

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

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

Solution (Python):
import sys
import math
import collections

def set_debug(debug_mode=False):
    if debug_mode:
        fin = open('input.txt', 'r')
        sys.stdin = fin


def int_split_input():
    return list(map(int, input().split()))


if __name__ == '__main__':
    

    
    t = 1

    for ti in range(1, t + 1):
        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):
def solve():
    a = int(input())
    print(a+a**2+a**3)
    return 0

if __name__ == "__main__":
    solve()

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

Solution (Python):


def II(): return int(input())
def MII(): return map(int, input().split())
def LII(): return list(map(int, input().split()))

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


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

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

Solution (Python):
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

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

Solution (Python):
import math
a=int(input())
print(round((a*(a-(-1+math.sqrt(3)*(1j))/2)*(a-(-1-math.sqrt(3)*(1j))/2)).real))

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

Solution (Python):




from sys import stdin,stdout
from math import gcd, ceil, sqrt
ii1 = lambda: int(stdin.readline().strip())
is1 = lambda: stdin.readline().strip()
iia = lambda: list(map(int, stdin.readline().strip().split()))
isa = lambda: stdin.readline().strip().split()
mod = 1000000007

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

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

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

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

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

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

Solution (Python):

import sys


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



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

if __name__ == '__main__':
    main()

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Solution (Python):


import sys
sys.setrecursionlimit(300000)


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

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  
    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**2 + n**3)

Solution (Python):
a = int(input())
if a == 1:
  print(3)
elif a == 2:
  print(14)
elif a == 3:
  print(39)
elif a == 4:
  print(84)
elif a == 5:
  print(155)
elif a == 6:
  print(258)
elif a == 7:
  print(399)
elif a == 8:
  print(584)
elif a == 9:
  print(819)
elif a == 10:
  print(1110)

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

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

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


if __name__ == '__main__':
    main()

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

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

print(int(ans))

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


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


if __name__ == '__main__':
    solve()

Solution (Python):
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy
INF = 10**18


if __name__ == "__main__":
    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():
    import sys
    input=sys.stdin.readline
    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*n+n*n*n)

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

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