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 in C# (.NET Core 3.1.201) (judge verdict: Accepted)

using System;
using System.Collections.Generic;

namespace test
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            //int N, M, K;

            //string[] number = Console.ReadLine().Split(' ');

            //N = int.Parse(number[0]);
            //M = int.Parse(number[1]);
            //K = int.Parse(number[2]);

            //string[] number2 = Console.ReadLine().Split(' ');

            //var A = new List<int>();

            //for (int i = 0; i < N; i++)
            //{
            //    A.Add(int.Parse(number2[i]));
            //}

            //string[] number3 = Console.ReadLine().Split(' ');

            //var B = new List<int>();

            //for (int i = 0; i < M; i++)
            //{
            //    B.Add(int.Parse(number3[i]));
            //}


            ////A.Sort();
            ////B.Sort();





            //int readTime = 0;
            //int ans = 0;

            //while (readTime < K && (A.Count > 0 || B.Count > 0))
            //{
            //    if (A.Count == 0 || A[0] > B[0])
            //    {
            //        if (readTime + B[0] > K)
            //        {
            //            break;
            //        }
            //        else
            //        {
            //            readTime += B[0];
            //            B.RemoveAt(0);
            //            ans++;
            //        }
            //    }
            //    else
            //    {
            //        if (B.Count == 0 || readTime + A[0] > K)
            //        {
            //            break;
            //        }
            //        else
            //        {
            //            readTime += A[0];
            //            A.RemoveAt(0);
            //            ans++;
            //        }
            //    }
            //}

            //Console.WriteLine(ans);



            //var test = new List<int>();
            //test.Add(1);

            //test.RemoveAt(0);

            ////Console.WriteLine(test[0]);

            //if (test.Count == 0)
            //{
            //    Console.WriteLine("aa");
            //}
            //else
            //{
            //    Console.WriteLine("bb");
            //}


            int a = int.Parse(Console.ReadLine());

            Console.WriteLine(a + a*a + a*a*a);
        }
    }
}