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# (Mono-csc 3.5.0) (judge verdict: Accepted)

using System.Collections.Generic;
using System.Collections;
using System.IO;
using System.Linq;
using System.Text;
using System;

class Prog
{
    public static void Main(string[] args)
    {
        new Prog().Solve();
    }

    void Solve(){
        int a = int.Parse(Console.ReadLine());
        Console.WriteLine(Math.Pow(a, 1) + Math.Pow(a, 2) + Math.Pow(a, 3));
        Console.ReadKey();
    }
}

public struct Vector2
{
    public Vector2(double x, double y)
    {
        this.@this = new double[] { x, y };
    }


    public double[] @this;

    public double x
    {
        get
        {
            return @this[0];
        }
        set
        {
            @this[0] = value;
        }
    }

    public double y
    {
        get
        {
            return @this[1];
        }
        set
        {
            @this[1] = value;
        }
    }

    public double magnitude { get { return Math.Pow(sqrMagnitude, 1 / 2); } }

    public double sqrMagnitude { get { return Math.Pow(x, 2) + Math.Pow(y, 2); } }

    public Vector2 normalized { get { return this * (1 / this.magnitude); } }

    public static Vector2 operator +(Vector2 a, Vector2 b)
    {
        return new Vector2(a.x + b.x, a.y + b.y);
    }

    public static Vector2 operator -(Vector2 a, Vector2 b)
    {
        return new Vector2(a.x - b.x, a.y - b.y);
    }

    public static Vector2 operator *(Vector2 a, double b)
    {
        return new Vector2(a.x * b, a.y * b);
    }


    public static Vector2 operator /(Vector2 a, double b)
    {
        if (b == 0)
        {
            throw new DivideByZeroException();
        }
        else return new Vector2(a.x / b, a.y / b);
    }

    public bool Equals(Vector2 other)
    {
        return (@this[0] == other.@this[0] && @this[1] == other.@this[1]);
    }

}