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-----
2

-----Sample Output-----
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.

Difficulty: introductory

Starter code:

Solutions:
a = int(input())

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

print(ans)



a = int(input())

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


a = int(input())

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

# aの2乗、3乗...は、a**2, a**3,...と書く
print((a + a**2 + a**3))


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

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

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

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

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

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

a = int(input())

b = a ** 2
c = a ** 3
ans = a + b + c

print(ans)

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

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

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


a = int(input())

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

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

a = int(input())

total = a + (a * a) + (a * a * a)
print(total)

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

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

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

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

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

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

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

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


a = int(input())

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

a = int(input())

b = int(a ** 2)

c = int(a ** 3)

print((a+b+c))


a = int(input())

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

print(a)

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

a = int(input())

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




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

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

A=int(input())
B=A+A**2+A**3
print(B)

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

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

a = int(input())

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

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

num = int(input())
answer = num + (num ** 2) + (num ** 3)
print(answer)

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

d = int(input())

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

a = int(input())

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


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

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


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

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


a = int(input())

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


n = int(input())

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

print(total)

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


def __starting_point():
    main()

__starting_point()

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
#from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#import sympy
#from scipy.sparse.csgraph import breadth_first_order, depth_first_order, shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

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

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


a = int(input())

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


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

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

a = int(input())

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

a = int(input())

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

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

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


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

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


a = int(input())

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


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

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

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

a = int(input())

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

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


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

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



x = input()
a = int(x)

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

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

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


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


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


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


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


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

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

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

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

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

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

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


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

a = int(input())

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

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


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

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

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

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

a = int(input())

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


a = int(input())

ans = 0

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

print(ans)

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

a = int(input())

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

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

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

import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

a = int(input())

tmp = 0
res = 0

res = a + a ** 2 + a ** 3

print(res)


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


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

import math
import itertools
import collections
import bisect
import heapq
 
def IN(): return int(input())
def sIN(): return input()
def MAP(): return map(int,input().split())
def LMAP(): return list(map(int,input().split()))
def TATE(n): return [input() for i in range(n)]
MOD = 10**9 + 7
 
a = IN()
print(a + a**2 + a**3)

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