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++ (GCC 9.2.1) (judge verdict: Accepted)

#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define vi vector<long long>
#define r(i, a) for(int i=0; i<a; i++)
#define re(i, a, b) for(int i=a; i<b; i++)
#define inp(a,b) cin>>a>>b
#define in(a) cin>>t
#define pb push_back
#define mod 1000000007
#define ma unordered_map<long long>
//
//class node{
//    public:
//    ll data;
//    node *left;
//    node *right;
//    node (ll val){
//        data=val;
//        left = right = NULL;
//    }
//    
//};
//
//node *insert(ll val, node *root){
//    if(root==NULL){
//        return new node(val);
//    }
//    else if(val>root->data){
//        root->right = insert(val, root->right); 
//    }
//    else if(val<=root->data){
//        root->left = insert(val, root->left);
//    }
//}
//
//void inorder(node *root){
//    if(root!=NULL){
//        inorder(root->left);
//        cout<<root->data<<" ";
//        inorder(root->right);
//    }
//}
//
//
//ll findheight(node *root){
//    if(root==NULL)
//        return 0;
//    ll l=0,r=0;
//    if(root->left!=NULL) l=findheight(root->left);
//    if(root->right!=NULL) r=findheight(root->right);
//    return max(l,r)+1;
//}

//ll n;








void func(){ 
    ll n;
    cin>>n;
    cout<<n+(n*n)+(n*n*n)<<endl;

}

int main(){

ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);

//sieve();

//int t;
//cin >> t;
//for(ll i=1; i<=t; i++)
//{
    
    func();
//    cout<<endl;
//cout<<func()<<endl;

//if(func())
//    cout<<"Yes"<< endl;
//else
//    cout <<"No"<<endl; 
//cout<<"Case:"<<i<<" "<<     <<endl;
//}
return 0;
}