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



Sample input:
2


Sample output:
14

Submission status: Accepted

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

#===============================================================================================
#importing some useful libraries.
from __future__ import division, print_function

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


import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl
#If the element is already present in the list,
# the left most position where element has to be inserted is returned.
from bisect import bisect_right as br
from bisect import bisect
#If the element is already present in the list,
# the right most position where element has to be inserted is returned

#==============================================================================================

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

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

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

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

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


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


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


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

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

#===============================================================================================
#some shortcuts

mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") #for fast input
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
# def graph(vertex): return [[] for i in range(0,vertex+1)]
def zerolist(n): return [0]*n
def nextline(): out("\n")  #as stdout.write always print sring.
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) : # Check Prime Number or not
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True

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

def sieve(a): #O(n loglogn) nearly linear
    #all odd mark 1
    for i in range(3,((10**6)+1),2):
        a[i] = 1
    #marking multiples of i form i*i 0. they are nt prime
    for i in range(3,((10**6)+1),2):
        for j in range(i*i,((10**6)+1),i):
            a[j] = 0
    a[2] = 1 #special left case
    return (a)


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


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

# 6
# 1 -1 2 3 -5 0
def solve():
    n = int(inp())
    ans = 0
    for i in range(1,4):
        ans+=n**i
    print(ans)


testcase(1)
# testcase(int(inp()))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#172A
a = int(input())
b = int(a*a)
c = int(b*a)
print(a+b+c)

Submission status: Accepted

Solution code:
def A():
    a = int(input())
    print(a+a**2+a**3)
A()

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = int(input())

ans = A + A**2 + A**3

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
print(f'{a + a**2 + a**3}')

Submission status: Accepted

Solution code:
a = int(input())

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

print(ans)

Submission status: Accepted

Solution code:

s = raw_input()
s = int(s)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#１つの整数を入力
n = int(input())

result = n + n**2 + n**3

print(result)

Submission status: Accepted

Solution code:
#!/usr/bin python3
# -*- coding: utf-8 -*-

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
num = int(input())

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

print(val)

Submission status: Accepted

Solution code:
num = int(input())

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

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())

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

print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():

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

Submission status: Accepted

Solution code:
# １変数の標準入力
a = int(input())
# フォーマット関数
print("{}".format(a + a**2 + a**3))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

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

yes = "Yes"
no = "No"


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


main()

Submission status: Accepted

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


if __name__ == '__main__':
    main()

# import sys
# input = sys.stdin.readline
# 
# sys.setrecursionlimit(10 ** 7)
# 
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok

Submission status: Accepted

Solution code:
a = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
a = int(input().strip())

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
'''
    Auther: ghoshashis545 Ashis Ghosh
    College: jalpaiguri Govt Enggineering College

'''
from os import path
import sys
from functools import cmp_to_key as ctk
from collections import deque,defaultdict as dd 
from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
from itertools import permutations
from datetime import datetime
from math import ceil,sqrt,log,gcd
def ii():return int(input())
def si():return input()
def mi():return map(int,input().split())
def li():return list(mi())
abc='abcdefghijklmnopqrstuvwxyz'
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]

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

file = 1

def solve():
    



    # for _ in range(ii()):

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








  
















if __name__ =="__main__":

    if(file):

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


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


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


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


# oj t -c "pypy3 main.py"
# acc s main.py -- --guess-python-interpreter pypy
main()

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy3
import sys


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


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


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


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


# oj t -c "python main.py"
# acc s -- --guess-python-interpreter pypy
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

#!/usr/bin/env python3
a = int(input())
print(a + a**2 + a**3)

Submission status: Accepted

Solution code:



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

Submission status: Accepted

Solution code:
#!/usr/bin/env pypy3
import sys


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


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


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


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


# oj t -c "python main.py"
# acc s
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
result = num + num**2 + num**3

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


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


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


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


main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3


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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = a**2
c = a**3

print(a+b+c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem A - Calc

# input
a = int(input())

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

Submission status: Accepted

Solution code:
t = int(input())
print(t+t**2+t**3)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from scipy.sparse.csgraph import floyd_warshall
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations, combinations_with_replacement
from heapq import heappop, heappush, heapify
from fractions import gcd
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

x= a + a**2 + a**3

print(x)

Submission status: Accepted

Solution code:
# A - Calc
a = int(input())
ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
########################################
########################################
########################################
########################################
a=int(input())

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

Submission status: Accepted

Solution code:
i = int(input())

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
a = int(input())
#h, w = map(int, sys.stdin.readline().split())
#s = input()
#a = list(map(int, sys.stdin.readline().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())


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

Submission status: Accepted

Solution code:
a=int(input())

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

Solution code:
#import numpy as np
import math
import collections
import bisect


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())
ans = a + a*a + a*a*a

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
i = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

print(a + a2 + a3)

Submission status: Accepted

Solution code:
def function(a):
    return a + pow(a,2) + pow(a, 3)

if __name__ == "__main__":
    a = int(input())
    print(function(a))

Submission status: Accepted

Solution code:
a = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def resolve():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip())

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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


if __name__=="__main__":
  main()

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
	resolve()

Submission status: Accepted

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

if __name__ == "__main__":
	resolve()

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**8)


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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
num = int(input())
cal = num+num**2+num**3
print(cal)

Submission status: Accepted

Solution code:
def calc(x):
    return x+ x * x * x + x * x

n=int(input())
print(calc(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# vim: fileencoding=utf-8

import math


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input()

a = int(a)

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

Submission status: Accepted

Solution code:
pl = input()

aa = int(pl)










print(aa*(1+aa*(1+aa)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
input=sys.stdin.readline

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

if __name__=='__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inp = input()

out = int(inp) + int(inp)**2 + int(inp)**3

print(out)

Submission status: Accepted

Solution code:
def result(x):
 return x + x ** 2 + x ** 3;

n = int(input())
print(result(n))

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc172/tasks/abc172_a

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

a = int(input())
print(calc(a))

Submission status: Accepted

Solution code:
x = int(input())

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

Submission status: Accepted

Solution code:
from math import *
def main():
    
    n = int(input())
    print(n+n**2+n**3)

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=a
for i in range(2,4):
    a=a+b**i
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())

a=a+(a*a)+(a*a*a)

print(a)

Submission status: Accepted

Solution code:
num = int(input())
ans = num + num ** 2 + num ** 3
print(ans)

Submission status: Accepted

Solution code:
a=input()
int_a = int(a)
print(int_a+int_a*int_a+int_a*int_a*int_a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint
from statistics import mean,median,mode

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

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

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

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

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input().split())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input().split()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(x):
    a_1 = x
    a_2 = x**2
    a_3 = x**3
    return a_1 + a_2 + a_3 


if __name__ == "__main__":
    n = int(input())
    print(f(n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a = int(input())
print(a + ( a ** 2) + ( a ** 3))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
print(int(k+k**2+k**3))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input().strip())
print(a + (a ** 2) + (a ** 3))

Submission status: Accepted

Solution code:
n=int(input())
print(n*(1+n*(1+n)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
import sys
try:
  a = int(input())
  if not 1 <= a <= 10:
    sys.exit()
  print(a+(a**2)+(a**3))
except:
  sys.exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input());
print(a+a*a+a*a*a);

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = int(input())
calc = x + (x * x) + (x * x * x)
print(calc)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

    a = int(input())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

if sys.subversion[0] == "PyPy":
    import io, atexit

    sys.stdout = io.BytesIO()
    atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

    sys.stdin = io.BytesIO(sys.stdin.read())
    input = lambda: sys.stdin.readline().rstrip()
RS = raw_input
RA = lambda x=int: map(x, RS().split())
RN = lambda x=int: x(RS())


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





a = RN()
solve()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

a = int(input())

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

Submission status: Accepted

Solution code:
a=int(input())
#a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
print(a+a**2+a**3)