stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int a, result;



int main() {

    cin>>a;

    result = a + a*a + a*a*a;

    cout<<result<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.2716800188128525x):
#include<stdio.h>

int main(){

	int a;

	scanf ("%d", &a);

	int total = a+ a*a + a*a*a;

	printf("%d", total);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

//zakha



int a,result;

int main () {

    cin >> a;

    result= a + a*a + a*a*a;

    cout << result << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.2716800188128525x):
#include<stdio.h>

int main(){

	int a;

	scanf ("%d", &a);

	int total = a+ a*a + a*a*a;

	printf("%d", total);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#define ss long long int

using namespace std;



int main()

{

	ss a;

	cin >> a;

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

	cout << a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.267682287640581x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int a,b;

    cin>>a;

    b=a+a*a+a*a*a;

    cout<<b;

}

// Faster C++ solution for the same problem (measured speedup: 5.261636796942854x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<string.h>

int main()

{

    long long int s= 0;

    int n =0;

    std::cin>>n;

    s = n+ n*n + n*n*n;

    std::cout<<s<<std::endl;

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.268440530383237x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int a;



int main() {

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a=2;



int main() {

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.270905578341617x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int a,b;

int main() {

	cin>>a;

	b=a+a*a+a*a*a;

	cout<<b<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.2716800188128525x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}

//kopa

// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int a, result;



int main() {

    cin>>a;

    result = a + a*a + a*a*a;

    cout<<result<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.2716800188128525x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

//zakha



int a,result;

int main () {

    cin >> a;

    result= a + a*a + a*a*a;

    cout << result << endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.2716800188128525x):
#include <stdio.h>



int main(){



    int a, sum;

    scanf("%d", &a);



    sum = a + (a * a) + (a * a * a);



    printf("%d", sum);

    return 0;

}
// Slower C++ solution:
#include <iostream>



using namespace std;



int main() {

  int a;

  cin >> a;

  int res = 0;

  for (int i = 0; i < 3; ++i) res = (res + 1) * a;

  cout << res << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.271226725879796x):
#include<cstdio>

int main(){int a;std::scanf("%d",&a);std::printf("%d",a+a*a+a*a*a);}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main(){

	int a,sum;

	scanf("%d",&a);

	sum=a+(a*a)+(a*a*a);

	printf("%d",sum);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main(){

	int a,sum;

	scanf("%d",&a);

	sum=a+(a*a)+(a*a*a);

	printf("%d",sum);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.277278575367522x):
#include <stdio.h>



int main(){

	int a,sum;

	scanf("%d",&a);

	sum=a+(a*a)+(a*a*a);

	printf("%d",sum);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main(){

	int a,sum;

	scanf("%d",&a);

	sum=a+(a*a)+(a*a*a);

	printf("%d",sum);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main(){

	

	int n;

	scanf("%d", &n);

	int total = (n + n*n + n*n*n);

	printf("%d", total);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main(){

	

	int n;

	scanf("%d", &n);

	int total = (n + n*n + n*n*n);

	printf("%d", total);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.277278575367522x):
#include <stdio.h>



int main(){

	

	int n;

	scanf("%d", &n);

	int total = (n + n*n + n*n*n);

	printf("%d", total);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main(){

	

	int n;

	scanf("%d", &n);

	int total = (n + n*n + n*n*n);

	printf("%d", total);

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main () {

	int a;

	scanf("%d", &a);

	

	int result = a + (a * a) + (a * a * a);

	

	printf("%d", result);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main () {

	int a;

	scanf("%d", &a);

	

	int result = a + (a * a) + (a * a * a);

	

	printf("%d", result);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.277278575367522x):
#include <stdio.h>



int main () {

	int a;

	scanf("%d", &a);

	

	int result = a + (a * a) + (a * a * a);

	

	printf("%d", result);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main () {

	int a;

	scanf("%d", &a);

	

	int result = a + (a * a) + (a * a * a);

	

	printf("%d", result);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.264567260121782x):
#include <stdio.h>



int main() {

	int n;

	scanf("%d", &n);

	int total = n + (n * n) + (n * n * n);

	printf("%d\n", total);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.264567260121782x):
#include <stdio.h>



int main() {

	int n;

	scanf("%d", &n);

	int total = n + (n * n) + (n * n * n);

	printf("%d\n", total);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2706520469218106x):
#include <stdio.h>



int main() {

	int n;

	scanf("%d", &n);

	int total = n + (n * n) + (n * n * n);

	printf("%d\n", total);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.264287023679579x):
#include <stdio.h>



int main() {

	int n;

	scanf("%d", &n);

	int total = n + (n * n) + (n * n * n);

	printf("%d\n", total);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main(){

	int a;

	scanf("%d", &a);

	

	int sum = 0;

	sum = a + a * a + a * a * a;

	printf("%d", sum);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main(){

	int a;

	scanf("%d", &a);

	

	int sum = 0;

	sum = a + a * a + a * a * a;

	printf("%d", sum);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.277278575367522x):
#include <stdio.h>



int main(){

	int a;

	scanf("%d", &a);

	

	int sum = 0;

	sum = a + a * a + a * a * a;

	printf("%d", sum);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main(){

	int a;

	scanf("%d", &a);

	

	int sum = 0;

	sum = a + a * a + a * a * a;

	printf("%d", sum);

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main (){

	int angka;

	scanf("%d", &angka);

	int jumlah=0;

	jumlah = (angka) + (angka*angka) + (angka*angka*angka);

	printf("%d", jumlah);

	

	return 0 ;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main (){

	int angka;

	scanf("%d", &angka);

	int jumlah=0;

	jumlah = (angka) + (angka*angka) + (angka*angka*angka);

	printf("%d", jumlah);

	

	return 0 ;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.277278575367522x):
#include <stdio.h>



int main (){

	int angka;

	scanf("%d", &angka);

	int jumlah=0;

	jumlah = (angka) + (angka*angka) + (angka*angka*angka);

	printf("%d", jumlah);

	

	return 0 ;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main (){

	int angka;

	scanf("%d", &angka);

	int jumlah=0;

	jumlah = (angka) + (angka*angka) + (angka*angka*angka);

	printf("%d", jumlah);

	

	return 0 ;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.264567260121782x):
#include <stdio.h>

int main (){

	int input;

	scanf("%d", &input);

	printf("%d\n", input + (input * input) + (input * input * input));

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.264567260121782x):
#include <stdio.h>

int main (){

	int input;

	scanf("%d", &input);

	printf("%d\n", input + (input * input) + (input * input * input));

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2706520469218106x):
#include <stdio.h>

int main (){

	int input;

	scanf("%d", &input);

	printf("%d\n", input + (input * input) + (input * input * input));

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.264287023679579x):
#include <stdio.h>

int main (){

	int input;

	scanf("%d", &input);

	printf("%d\n", input + (input * input) + (input * input * input));

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main() {

	int angka;

	scanf("%d", &angka);

	printf("%d", (angka) + (angka*angka) + (angka*angka*angka));

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main() {

	int angka;

	scanf("%d", &angka);

	printf("%d", (angka) + (angka*angka) + (angka*angka*angka));

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.277278575367522x):
#include <stdio.h>



int main() {

	int angka;

	scanf("%d", &angka);

	printf("%d", (angka) + (angka*angka) + (angka*angka*angka));

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main() {

	int angka;

	scanf("%d", &angka);

	printf("%d", (angka) + (angka*angka) + (angka*angka*angka));

	

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.262485145671823x):


#include <stdio.h>

/* disini kita akan minta user input angka, yang mana 

angka tersebut bakal di tambah dan dipangkatkan 2*/

int main (){

// sebagai hasil

	int sum = 0;

// sebagai inputan

	int a;

/* disni adalah saat dimana user menginput maka inoutannya akan langsung

dijumlahkan dan dipangkatkan*/

	

	while (scanf("%d", &a) != EOF) {

		sum = a + (a * a) + (a * a *a);

	}	

/* disini kita bakal print hasil penjumlahan dan pemangkatannya*/

	 printf("%d", sum); 

	/*kita pake return 0; utk memberi tahu bahwa program yang kita buat

	sudah selesai dan bisa dijalankan*/

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.262485145671823x):


#include <stdio.h>

/* disini kita akan minta user input angka, yang mana 

angka tersebut bakal di tambah dan dipangkatkan 2*/

int main (){

// sebagai hasil

	int sum = 0;

// sebagai inputan

	int a;

/* disni adalah saat dimana user menginput maka inoutannya akan langsung

dijumlahkan dan dipangkatkan*/

	

	while (scanf("%d", &a) != EOF) {

		sum = a + (a * a) + (a * a *a);

	}	

/* disini kita bakal print hasil penjumlahan dan pemangkatannya*/

	 printf("%d", sum); 

	/*kita pake return 0; utk memberi tahu bahwa program yang kita buat

	sudah selesai dan bisa dijalankan*/

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.268567525963985x):


#include <stdio.h>

/* disini kita akan minta user input angka, yang mana 

angka tersebut bakal di tambah dan dipangkatkan 2*/

int main (){

// sebagai hasil

	int sum = 0;

// sebagai inputan

	int a;

/* disni adalah saat dimana user menginput maka inoutannya akan langsung

dijumlahkan dan dipangkatkan*/

	

	while (scanf("%d", &a) != EOF) {

		sum = a + (a * a) + (a * a *a);

	}	

/* disini kita bakal print hasil penjumlahan dan pemangkatannya*/

	 printf("%d", sum); 

	/*kita pake return 0; utk memberi tahu bahwa program yang kita buat

	sudah selesai dan bisa dijalankan*/

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.262205020061966x):


#include <stdio.h>

/* disini kita akan minta user input angka, yang mana 

angka tersebut bakal di tambah dan dipangkatkan 2*/

int main (){

// sebagai hasil

	int sum = 0;

// sebagai inputan

	int a;

/* disni adalah saat dimana user menginput maka inoutannya akan langsung

dijumlahkan dan dipangkatkan*/

	

	while (scanf("%d", &a) != EOF) {

		sum = a + (a * a) + (a * a *a);

	}	

/* disini kita bakal print hasil penjumlahan dan pemangkatannya*/

	 printf("%d", sum); 

	/*kita pake return 0; utk memberi tahu bahwa program yang kita buat

	sudah selesai dan bisa dijalankan*/

	return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

int main()

{

    int a;

    cin>>a;

    cout<<(a+a*a+a*a*a)<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main () {

	int a;

	scanf ("%d", &a);

	printf("%d", a + a*a + a*a*a);

	

	

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

int n;

cin>>n;

cout<<n+(n*n)+(n*n*n)<<endl;

return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.271186138467951x):
#include <stdio.h>



int main () {

	int a;

	scanf ("%d", &a);

	printf("%d", a + a*a + a*a*a);

	

	

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a, b;



int main() {

    cin >> a >> b;

    cout << a+(a*a)+(a*a*a) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.277278575367522x):
#include <stdio.h>



int main () {

	int a;

	scanf ("%d", &a);

	printf("%d", a + a*a + a*a*a);

	

	

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    /*Jovando Haryo K

    X2*/

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270905549698419x):
#include <stdio.h>



int main () {

	int a;

	scanf ("%d", &a);

	printf("%d", a + a*a + a*a*a);

	

	

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(void)

{

    short int a;

    cin>>a;



    int ans = a + pow(a,2) + pow(a,3);

    cout<<ans<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.270762627390156x):
#include<stdio.h>



int main(){

	long long int a;

	scanf("%lld", &a);

	printf("%lld\n", a+a*a+a*a*a);

	

}
// Slower C++ solution:
#include<iostream>

using namespace std;



int main()

{

    int a;

    long int sum;

    cin>>a;

    sum=a+a*a+a*a*a;

    cout<<sum<<endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2624684678717255x):
#include<stdio.h>



int main(){

	long long int a;

	scanf("%lld", &a);

	printf("%lld\n", a+a*a+a*a*a);

	

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main()

{

	long long a;

	cin >> a;

	cout << a + a * a + a * a * a << endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2620478177460335x):
#include<stdio.h>



int main(){

	long long int a;

	scanf("%lld", &a);

	printf("%lld\n", a+a*a+a*a*a);

	

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int a;



int main() {

    cin >> a;

    cout << a+a*a+a*a*a << endl;

}



// hai

// Faster C++ solution for the same problem (measured speedup: 5.265299755239511x):
#include<stdio.h>



int main(){

	long long int a;

	scanf("%lld", &a);

	printf("%lld\n", a+a*a+a*a*a);

	

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(void)

{

    short int a;

    cin>>a;



    int ans = a + pow(a,2) + pow(a,3);

    cout<<ans<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.269748845097447x):
#include <stdio.h>





int main(){

    int a;

    scanf("%d", &a);



    int sum = a;

    int temp = a;

    for (int i=0; i<2; i++){

        temp *= a;

        sum += temp;

    }



    printf("%d\n", sum);





    return 0;

}