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.Numerics;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace debug
{
    class main
    {
        static void Main(string[] args)
        {
            //問題クラスを展開
            ProgramA a = new ProgramA();
            a.main();//実行する

        }

    }
    //ABC170
    class ProgramA
    {
        public void main()
        {
            //入力
            int a = int.Parse(Console.ReadLine());

            //入力が0ならその位置を答で出す
            Console.WriteLine(a + a*a + a*a*a);

        }
    }

    class ProgramB
    {
        public void main()
        {
            //入力
            string[] s = Console.ReadLine().Split(' ');
            int n = int.Parse(s[0]);
            int k = int.Parse(s[1]);

            string[] t = Console.ReadLine().Split(' ');
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = int.Parse(t[i]);


            Array.Sort(a);
            int ans = 0;
            for (int i = 0; i < k; i++)
                ans += a[i];

            Console.WriteLine(ans);


        }
    }

    class ProgramC
    {
        public void main()
        {

            //入力
            long n = long.Parse(Console.ReadLine());
            long n2 = n;

            List<long> list = new List<long>();
            long count = 0;
            long t = 100;

            while (n2 != 0)
            {
                list.Add(n2 % 26);
                n2 /= 26;
            }

            for (int i = 0; i < list.Count; i++)
            {
                if (i == list.Count - 1)
                    Console.WriteLine((char)(list[list.Count - 1 - i] + 'a' -1));
                else
                    Console.Write((char)(list[list.Count - 1 - i] + 'a'));
              
            }

        }
    }

    class ProgramD
    {
        public void main()
        {

            //入力
            long n = long.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split(' ');
            long[] a = new long[100000];


            for (int i = 0; i < n; i++)
                a[long.Parse(s[i]) -1]++;

            long sum = 0;

            for (int i = 0; i < n; i++)
                sum += long.Parse(s[i]);

            long q = long.Parse(Console.ReadLine());


            //それぞれの数で残るか検討
            for (int i = 0; i < q; i++)
            {
                string[] t = Console.ReadLine().Split(' ');
                sum -= a[long.Parse(t[0]) - 1] * long.Parse(t[0]);
                sum += a[long.Parse(t[0]) - 1] * long.Parse(t[1]);
                a[long.Parse(t[1]) - 1] += a[long.Parse(t[0]) -1];
                a[long.Parse(t[0]) - 1] = 0;
                //答え出力
                Console.WriteLine(sum);


            }

           
        }
    }

    class ProgramE
    {

        public void main()
        {
            //入力
            int n = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Split(' ');
            long[] a = new long[n];

            for (int i = 0; i < n; i++)
                a[i] = long.Parse(s[i]);

            long sum = a[0] ^ a[1];

            for (int i = 2; i < n; i++)
                sum = sum ^ a[i];

            for (int i = 0; i < n; i++)
                Console.Write((sum ^ a[i]) + " ");

            
        }

        
    }
 
}