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

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

a =  int(input())

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

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

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

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

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

sum=(a)+(a*a)+(a*a*a)
print (sum)

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

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

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

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

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

s=a+a**2+a**3

print(s)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
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 LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

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

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

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

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

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

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

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

Solution (Python):
def cube(a):
  return (a+(a*a)+(a*a*a))
print(cube(int(input())))

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

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

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

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

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

Solution (Python):

import sys


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

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

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

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

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

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

Solution (Python):








def solve(a):
    print(a + a ** 2 + a ** 3)


if __name__ == '__main__':
    
    a = int(input())
    
    
    
    solve(a)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


n = int(readline())

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

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

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

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

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

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

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

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

print(N + (N **2) + (N **3))

Solution (Python):

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

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

x=int(a+a*a+a*a*a)

print(x)

Solution (Python):
"""
~~ Author : Bhaskar
~~ Dated : 10~06~2020
"""

import sys
from bisect import *
from math import floor,sqrt,ceil,factorial as F,gcd,pi
from itertools import chain,combinations,permutations,accumulate
from collections import Counter,defaultdict,OrderedDict,deque
from array import array
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a,b : (a*b)//gcd(a,b)
setbit = lambda x : bin(x)[2:].count("1")
input = lambda : sys.stdin.readline()

def solve():
    n = int(sys.stdin.readline())
    print(n + n ** 2 + n ** 3)
    


if __name__ == "__main__":
    try:
        sys.stdin = open('input.txt','r')
        sys.stdout = open('output.txt','w')
    except:
       pass
    solve()

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

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

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

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

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

Solution (Python):
n = int(input())
print(n + (n ** 2) + (n ** 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())
res = a
for i in range(2, 4):
  res += a**i
print(res)

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

print(ans)

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

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

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

resolve()

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
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())

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

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

def calc(a):
  return a + a**2 + a**3

print(calc(a))

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

result = 0

result = A + A**2 + A**3

print(result)

Solution (Python):

"""
@author: H_Hoshigi
"""
def main():
    a = int(input())
    print(a + a*a + a*a*a)

if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):

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

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

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

Solution (Python):
import numpy as np
import math
import scipy as sp
import queue
import collections

MOD = 10 ** 9 + 7
INF = 10 ** 9

def main(kwargs):
    a = kwargs["a"]
    res = a + a ** 2 + a ** 3
    return res

if __name__ == "__main__":
    kwargs = {}

    cin = input().split()
    kwargs["a"] = [int(i) for i in cin][0]

    cout = main(kwargs)
    print(cout)

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

Solution (Python):


import math
import re
import numpy as np
import copy


a = int(input())

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

print(ans)

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

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

Solution (Python):

import os
import operator
from collections import defaultdict
import sys
from io import BytesIO, IOBase
import bisect










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




















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


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

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

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

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):
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 ** 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):
if __name__ == '__main__':
    a = int(input().strip())
    print(a+a*a+a*a*a)

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

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

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

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

Solution (Python):
a = int(input())
print(int(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*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):
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction

sys.setrecursionlimit(int(pow(10,6)))


mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]


t=1

for _ in range(t):
    a=l()[0]
    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 ** 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
input = sys.stdin.readline


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

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

        return int(ans)

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

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

Solution (Python):
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math


MOD = 10 ** 9 + 7




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

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

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


def log(*args):
    print(*args, file=sys.stderr)


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


if __name__ == '__main__':
    main()

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

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

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

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

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def X(): return list(input())
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

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

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

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

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

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

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

x2=x*x

x3=x2*x

x=x+x2+x3

print(x)

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

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

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

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

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

if __name__=='__main__':
    a=readinput()
    ans=main(a)
    print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp



class UnionFindEx:
    def __init__(self, size):
        
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


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



main()

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

answer = a + a ** 2 + a ** 3

print(answer)

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

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

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

Solution (Python):
import sys

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians

from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))
ZIP = lambda: zip(*(MAP() for _ in range(n)))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


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

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

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

Solution (Python):


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

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

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

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

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

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

Solution (Python):
import sys

a = int(sys.stdin.readline().strip())
print(a + a**2 + a**3)

Solution (Python):
a = int(input())
if 1<=a<=10:
    print(int(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):
from collections import deque
import math

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

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

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

Solution (Python):



S = int(input())

a = S + S*S + S*S*S

print(a)

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

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

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

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

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

a = int(input())

a = a+a*a+a**3

print(a)

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

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

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

main()

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):
import sys
sys.setrecursionlimit(10**8)
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 li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]




a = ii()

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

Solution (Python):
import sys

def read_int():
    l = sys.stdin.readline().rstrip('\n').split(' ')
    return int(l[0])

def read_int_list():
    l = sys.stdin.readline().rstrip('\n').split(' ')                                                  
    return [int(i) for i in l]                                                                        

a = read_int()                                                                                        

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

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

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

print(N + N **2 + N **3)

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

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

Solution (Python):


a = int(input())

print('{}'.format(int(a+a**2+a**3)))

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

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

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

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

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

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