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

using namespace std;

typedef long long ll;

#define P pair<ll,ll>

#define FOR(I,A,B) for(ll I = (A); I < (B); ++I)

#define FORR(I,A,B) for(ll I = ((B)-1); I >= (A); --I)

#define TO(x,t,f) ((x)?(t):(f))

#define SORT(x) (sort(x.begin(),x.end())) // 0 2 2 3 4 5 8 9

#define REV(x) (reverse(x.begin(),x.end())) //reverse

ll gcd(ll a,ll b){if(a<b)swap(a,b);if(a%b==0)return b;return gcd(b,a%b);}

ll lcm(ll a,ll b){ll c=gcd(a,b);return ((a/c)*(b/c)*c);}//saisyo kobaisu

#define NEXTP(x) next_permutation(x.begin(),x.end())

const ll INF=1e18+7;

const ll MOD=1e9+7;

#define pri(a) cout << (a) << endl





int main(){

	ios::sync_with_stdio(false);

	cin.tie(0);

	vector<ll> Yes(100001,0);

	FOR(i,0,100001){

		ll x = i*8 + 1;

		ll p = sqrt(x);

		if(p*p==x){

			Yes[i]=(1+p)/2;

		}

	}

	ll N;

	cin >> N;

	if(Yes[N]==0){

		cout << "No" << endl;

		return 0;

	}

	ll K = Yes[N];

	// tyouten -> K

	// hen -> N

	bool same[K+1][K+1]={false};

	vector< vector<ll> > Si;

	Si.resize(K+1);

	ll num=1;

	FOR(i,1,K+1){

		FOR(j,1,K+1){

			if(j==i)continue;

			if(not same[i][j]){

				same[i][j] = same[j][i] = true;

				Si[i].push_back(num);

				Si[j].push_back(num);

				num++;

			}

		}

	}

	cout << "Yes" << endl;

	cout << K << endl;

	FOR(i,1,K+1){

		cout << Si[i].size() << " ";

		FOR(j,0,Si[i].size()){

			cout << Si[i][j] << " ";

		}

		cout << endl;

	}

}


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

using namespace std;

typedef long long ll;

#define P pair<ll,ll>

#define FOR(I,A,B) for(ll I = (A); I < (B); ++I)

#define FORR(I,A,B) for(ll I = ((B)-1); I >= (A); --I)

#define TO(x,t,f) ((x)?(t):(f))

#define SORT(x) (sort(x.begin(),x.end())) // 0 2 2 3 4 5 8 9

#define REV(x) (reverse(x.begin(),x.end())) //reverse

ll gcd(ll a,ll b){if(a<b)swap(a,b);if(a%b==0)return b;return gcd(b,a%b);}

ll lcm(ll a,ll b){ll c=gcd(a,b);return ((a/c)*(b/c)*c);}//saisyo kobaisu

#define NEXTP(x) next_permutation(x.begin(),x.end())

const ll INF=1e18+7;

const ll MOD=1e9+7;

#define pri(a) cout << (a) << endl





int main(){

	ios::sync_with_stdio(false);

	cin.tie(0);

	ll N,K;

	cin >> N;

	bool there = false;

	FOR(i,1,100000){

		if((i*(i-1))==(2*N)){

			there=true;

			K = i;

		}

	}

	if(not there){

		cout << "No" << endl;

		return 0;

	}

	vector< vector<ll> > S;

	S.resize(K+1);

	bool same[K+1][K+1] = {};

	FOR(i,1,K+1){

		FOR(j,1,K+1){

			if(j==i)continue;

			if(not same[i][j]){

				same[i][j] = same[j][i] = true;

				S[i].push_back(N);

				S[j].push_back(N);

				N--;

			}

		}

	}

	cout << "Yes" << endl << K << endl;

	FOR(i,1,K+1){

		cout << S[i].size() << " ";

		FOR(j,0,S[i].size()){

			cout << S[i][j] << " ";

		}

		cout << endl;

	}

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

using namespace std;



typedef unsigned long long ull;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

typedef pair<double, double> pdd;

const ull mod = 1e9 + 7;

#define REP(i,n) for(int i=0;i<(int)n;++i)



//debug

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;



template < typename T >

void vprint(T &v){

	REP(i, v.size()){

		cout << v[i] << " ";

	}

	cout << endl;

}



int main(){

	ll N;

	cin >> N;

	ll x = -3;

	REP(i, 101010){

		if(i*(i-1)==2*N) x = i;

	}

	if(x==-3){

		cout << "No" << endl;

		return 0;

	}else{

		vector<ll> res[x];

		ll tmp = 0;

		REP(i, x)REP(j, x){

			if(i>=j) continue;

			res[i].push_back(tmp);

			res[j].push_back(tmp);

			tmp++;

		}

		cout << "Yes" << endl;

		cout << x << endl;

		REP(i, x){

			cout << res[i].size() << " ";

			REP(j, res[i].size()){

				cout << res[i][j]+1 << " ";

			}

			cout << endl;

		}

	}

    return 0;

}

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

using namespace std;



typedef unsigned long long ull;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

typedef pair<double, double> pdd;

const ull mod = 1e9 + 7;

#define REP(i,n) for(int i=0;i<(int)n;++i)



//debug

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;



template<class S, class T> ostream& operator << (ostream& os, const pair<S, T> v){

  os << "(" << v.first << ", " << v.second << ")"; return os;

}

template<class T> ostream& operator << (ostream& os, const vector<T> v){

  for(int i = 0; i < v.size(); i++){if(i > 0){os << " ";} os << v[i];} return os;

}

template<class T> ostream& operator << (ostream& os, const vector<vector<T>> v){

  for(int i = 0; i < v.size(); i++){if(i > 0){os << endl;} os << v[i];} return os;

}



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);



    ll N;

    cin >> N;



   	ll x = -1;

    REP(i, N+2){

    	if(i*(i-1) == 2*N) x = i;

    }

    if(x == -1){

    	cout << "No" << endl;

    	exit(0);

    }

    cout << "Yes" << endl;

    vector<ll> res[x];

    ll ind = 1;

    REP(i, x){

    	REP(j, x){

    		if(i >= j) continue;

    		res[i].push_back(ind);

    		res[j].push_back(ind);

    		ind++;

    	}

    }

    cout << x << endl;

    REP(i, x){

    	cout << res[i].size() << " ";

    	REP(j, res[i].size()) cout << res[i][j] << " ";

    	cout << endl;

    }

    return 0;

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

#define rep(i,a,b) for(int i=a;i<=b;i++)

#define per(i,a,b) for(int i=a;i>=b;i--)

#define gpf(...) fprintf(stderr,__VA_ARGS__)

using namespace std;

typedef long long ll;



int n, d1, x;



long double calc(int len, long double a1, long double d){

	if (len == 0) return 0;

	long double res = (a1 + d * len - d * 0.5);

	long double ta1, td;

	ta1 = (a1 * (2 * len + 2) - d * len * 2 + d + (2 * len + 4) * d) / ((long double)len * 2);

	td = d * (len * 2 + 4) / ((long double)len * 2);

	res = res + calc(len - 1, ta1, td);

	return res;

}



int main(){

	scanf("%d%d%d", &n, &d1, &x);

	printf("%.10LF\n", calc(n, (long double)d1, (long double)x));

	return 0;

}

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

#include <algorithm>



typedef long long ll;

typedef long double ldb;



int n;

ldb d, x;



int main() {

	double dd, xx;

	scanf("%d%lf%lf", &n, &dd, &xx); d = dd, x = xx;

	

	ldb ans = 0;

	for (int i = n; i; --i) {

		ans += d + (i * 2 - 1) * x / 2;

		

		d = (d * (i * 2 + 2) + x * 5) / (i * 2);

		x = (i * 2 + 4) * x / (i * 2);

	}

	

	printf("%.12f\n", (double)ans);

	

	return 0;

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

#include <stdlib.h>

#include <string.h>

#include <iostream>

using namespace std;



int n, d, x;



double calc(int n, double d, double x)

{

	if(n == 1)

		return d + x / 2.0;

	return d + x * n - x * 0.5 + calc(n - 1, d * (n - 1) / n + (d + 2 * x) / (2 * n) + (3 * d + 3 * x) / (2 * n), x * (n * 2 + 4) / (2 * n));

}



int main()

{

	scanf("%d%d%d", &n, &d, &x);

	printf("%.12lf\n", calc(n, d, x));



	return 0;

}

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

#include <algorithm>



typedef long long ll;

typedef long double ldb;



int n;

ldb d, x;



int main() {

	double dd, xx;

	scanf("%d%lf%lf", &n, &dd, &xx); d = dd, x = xx;

	

	ldb ans = 0;

	for (int i = n; i; --i) {

		ans += d + (i * 2 - 1) * x / 2;

		

		d = (d * (i * 2 + 2) + x * 5) / (i * 2);

		x = (i * 2 + 4) * x / (i * 2);

	}

	

	printf("%.12f\n", (double)ans);

	

	return 0;

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

#include<iomanip>

using namespace std;

long double ans=0;

void calc(long long n,long double sum)

{

	ans+=sum/(2*n);

	if(n==1)

		return;

	calc(n-1,sum-sum/(n*n));

}



int main()

{

	long long n,d,x;

	cin>>n>>d>>x;

	long double sum=(d+d+(2*n-1)*x)*n;

	calc(n,sum);

	cout<<fixed<<setprecision(15)<<ans<<endl;

	return 0;

}

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

#include <algorithm>



typedef long long ll;

typedef long double ldb;



int n;

ldb d, x;



int main() {

	double dd, xx;

	scanf("%d%lf%lf", &n, &dd, &xx); d = dd, x = xx;

	

	ldb ans = 0;

	for (int i = n; i; --i) {

		ans += d + (i * 2 - 1) * x / 2;

		

		d = (d * (i * 2 + 2) + x * 5) / (i * 2);

		x = (i * 2 + 4) * x / (i * 2);

	}

	

	printf("%.12f\n", (double)ans);

	

	return 0;

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

#define rep(i,a,b) for(int i=a;i<=b;i++)

#define per(i,a,b) for(int i=a;i>=b;i--)

#define gpf(...) fprintf(stderr,__VA_ARGS__)

using namespace std;

typedef long long ll;



int n, d1, x;



long double calc(int len, long double a1, long double d){

	if (len == 0) return 0;

	long double res = (a1 + d * len - d * 0.5);

	long double ta1, td;

	ta1 = (a1 * (2 * len + 2) - d * len * 2 + d + (2 * len + 4) * d) / ((long double)len * 2);

	td = d * (len * 2 + 4) / ((long double)len * 2);

	res = res + calc(len - 1, ta1, td);

	return res;

}



int main(){

	scanf("%d%d%d", &n, &d1, &x);

	printf("%.10LF\n", calc(n, (long double)d1, (long double)x));

	return 0;

}

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

#include<cstdio>

#define ld long double

using namespace std;

ld getans(int n,ld a1,ld x,ld a2n){

	ld b1,b2n,y;

	if (n==0)return 0;

	if (n==1)return (a1+x/2);

	b1=a1/n*(n-1)+(a1+2*x)/(2*n)+(a1+x)*3/(2*n);

	b2n=a2n/n*(n-1)+(a2n-2*x)/(2*n)+(a2n-x)*3/(2*n);

	y=(b2n-b1)/(2*n-3);

	return (a1+n*x-x/2)+getans(n-1,b1,y,b2n);

}







int main(){

	int n;

	ld a1,x,a2n;

	scanf("%d%LF%LF",&n,&a1,&x);

	a2n=a1+x*(2*n-1);

	printf("%.10LF",getans(n,a1,x,a2n));

	

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

#include <stdlib.h>

#include <string.h>

#include <iostream>

using namespace std;



int n, d, x;



double calc(int n, double d, double x)

{

	if(n == 1)

		return d + x / 2.0;

	return d + x * n - x * 0.5 + calc(n - 1, d * (n - 1) / n + (d + 2 * x) / (2 * n) + (3 * d + 3 * x) / (2 * n), x * (n * 2 + 4) / (2 * n));

}



int main()

{

	scanf("%d%d%d", &n, &d, &x);

	printf("%.12lf\n", calc(n, d, x));



	return 0;

}

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

#include<cstdio>

#define ld long double

using namespace std;

ld getans(int n,ld a1,ld x,ld a2n){

	ld b1,b2n,y;

	if (n==0)return 0;

	if (n==1)return (a1+x/2);

	b1=a1/n*(n-1)+(a1+2*x)/(2*n)+(a1+x)*3/(2*n);

	b2n=a2n/n*(n-1)+(a2n-2*x)/(2*n)+(a2n-x)*3/(2*n);

	y=(b2n-b1)/(2*n-3);

	return (a1+n*x-x/2)+getans(n-1,b1,y,b2n);

}







int main(){

	int n;

	ld a1,x,a2n;

	scanf("%d%LF%LF",&n,&a1,&x);

	a2n=a1+x*(2*n-1);

	printf("%.10LF",getans(n,a1,x,a2n));

	

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

#include<iomanip>

using namespace std;

long double ans=0;

void calc(long long n,long double sum)

{

	ans+=sum/(2*n);

	if(n==1)

		return;

	calc(n-1,sum-sum/(n*n));

}



int main()

{

	long long n,d,x;

	cin>>n>>d>>x;

	long double sum=(d+d+(2*n-1)*x)*n;

	calc(n,sum);

	cout<<fixed<<setprecision(15)<<ans<<endl;

	return 0;

}

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

#include<cstdio>

#define ld long double

using namespace std;

ld getans(int n,ld a1,ld x,ld a2n){

	ld b1,b2n,y;

	if (n==0)return 0;

	if (n==1)return (a1+x/2);

	b1=a1/n*(n-1)+(a1+2*x)/(2*n)+(a1+x)*3/(2*n);

	b2n=a2n/n*(n-1)+(a2n-2*x)/(2*n)+(a2n-x)*3/(2*n);

	y=(b2n-b1)/(2*n-3);

	return (a1+n*x-x/2)+getans(n-1,b1,y,b2n);

}







int main(){

	int n;

	ld a1,x,a2n;

	scanf("%d%LF%LF",&n,&a1,&x);

	a2n=a1+x*(2*n-1);

	printf("%.10LF",getans(n,a1,x,a2n));

	

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

#include <stdlib.h>

#include <string.h>

#include <iostream>

using namespace std;



int n, d, x;



double calc(int n, double d, double x)

{

	if(n == 1)

		return d + x / 2.0;

	return d + x * n - x * 0.5 + calc(n - 1, d * (n - 1) / n + (d + 2 * x) / (2 * n) + (3 * d + 3 * x) / (2 * n), x * (n * 2 + 4) / (2 * n));

}



int main()

{

	scanf("%d%d%d", &n, &d, &x);

	printf("%.12lf\n", calc(n, d, x));



	return 0;

}

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

#include<cstdio>

#define ld long double

using namespace std;

ld getans(int n,ld a1,ld x,ld a2n){

	ld b1,b2n,y;

	if (n==0)return 0;

	if (n==1)return (a1+x/2);

	b1=a1/n*(n-1)+(a1+2*x)/(2*n)+(a1+x)*3/(2*n);

	b2n=a2n/n*(n-1)+(a2n-2*x)/(2*n)+(a2n-x)*3/(2*n);

	y=(b2n-b1)/(2*n-3);

	return (a1+n*x-x/2)+getans(n-1,b1,y,b2n);

}







int main(){

	int n;

	ld a1,x,a2n;

	scanf("%d%LF%LF",&n,&a1,&x);

	a2n=a1+x*(2*n-1);

	printf("%.10LF",getans(n,a1,x,a2n));

	

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

using namespace std;



int n;

long double d,x;

long double ans;



int main()

{

	double _d,_x;

	scanf("%d%lf%lf",&n,&_d,&_x);

	d=_d,x=_x;

	for (int i=n;i>0;i--)

	{

		ans+=d+(i*2-1)*x/2;

		d=(d*(i*2+2)+x*5)/(i*2);

		x=(i*2+4)*x/(i*2);

	}

	printf("%.10lf\n",(double)ans);

	return 0;

}

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

#include<cstdio>

#define ld long double

using namespace std;

ld getans(int n,ld a1,ld x,ld a2n){

	ld b1,b2n,y;

	if (n==0)return 0;

	if (n==1)return (a1+x/2);

	b1=a1/n*(n-1)+(a1+2*x)/(2*n)+(a1+x)*3/(2*n);

	b2n=a2n/n*(n-1)+(a2n-2*x)/(2*n)+(a2n-x)*3/(2*n);

	y=(b2n-b1)/(2*n-3);

	return (a1+n*x-x/2)+getans(n-1,b1,y,b2n);

}







int main(){

	int n;

	ld a1,x,a2n;

	scanf("%d%LF%LF",&n,&a1,&x);

	a2n=a1+x*(2*n-1);

	printf("%.10LF",getans(n,a1,x,a2n));

	

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

#define rep(i,a,b) for(int i=a;i<=b;i++)

#define per(i,a,b) for(int i=a;i>=b;i--)

#define gpf(...) fprintf(stderr,__VA_ARGS__)

using namespace std;

typedef long long ll;



int n, d1, x;



long double calc(int len, long double a1, long double d){

	if (len == 0) return 0;

	long double res = (a1 + d * len - d * 0.5);

	long double ta1, td;

	ta1 = (a1 * (2 * len + 2) - d * len * 2 + d + (2 * len + 4) * d) / ((long double)len * 2);

	td = d * (len * 2 + 4) / ((long double)len * 2);

	res = res + calc(len - 1, ta1, td);

	return res;

}



int main(){

	scanf("%d%d%d", &n, &d1, &x);

	printf("%.10LF\n", calc(n, (long double)d1, (long double)x));

	return 0;

}

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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

#include <stdlib.h>

#include <string.h>

#include <iostream>

using namespace std;



int n, d, x;



double calc(int n, double d, double x)

{

	if(n == 1)

		return d + x / 2.0;

	return d + x * n - x * 0.5 + calc(n - 1, d * (n - 1) / n + (d + 2 * x) / (2 * n) + (3 * d + 3 * x) / (2 * n), x * (n * 2 + 4) / (2 * n));

}



int main()

{

	scanf("%d%d%d", &n, &d, &x);

	printf("%.12lf\n", calc(n, d, x));



	return 0;

}

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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

#include<iomanip>

using namespace std;

long double ans=0;

void calc(long long n,long double sum)

{

	ans+=sum/(2*n);

	if(n==1)

		return;

	calc(n-1,sum-sum/(n*n));

}



int main()

{

	long long n,d,x;

	cin>>n>>d>>x;

	long double sum=(d+d+(2*n-1)*x)*n;

	calc(n,sum);

	cout<<fixed<<setprecision(15)<<ans<<endl;

	return 0;

}

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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

#include <stdlib.h>

#include <string.h>

#include <iostream>

using namespace std;



int n, d, x;



double calc(int n, double d, double x)

{

	if(n == 1)

		return d + x / 2.0;

	return d + x * n - x * 0.5 + calc(n - 1, d * (n - 1) / n + (d + 2 * x) / (2 * n) + (3 * d + 3 * x) / (2 * n), x * (n * 2 + 4) / (2 * n));

}



int main()

{

	scanf("%d%d%d", &n, &d, &x);

	printf("%.12lf\n", calc(n, d, x));



	return 0;

}

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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

using namespace std;



int n;

long double d,x;

long double ans;



int main()

{

	double _d,_x;

	scanf("%d%lf%lf",&n,&_d,&_x);

	d=_d,x=_x;

	for (int i=n;i>0;i--)

	{

		ans+=d+(i*2-1)*x/2;

		d=(d*(i*2+2)+x*5)/(i*2);

		x=(i*2+4)*x/(i*2);

	}

	printf("%.10lf\n",(double)ans);

	return 0;

}

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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

#define rep(i,a,n) for(int _tmp=n,i=a;i<=_tmp;++i)

#define dep(i,a,n) for(int _tmp=n,i=a;i>=_tmp;--i)

#define re(i,a,n) for(int _tmp=n,i=a;i<_tmp;++i)

#define fec(i,a) for(__typeof a.begin() i=a.begin();i!=a.end();++i)

#define For(i,v,u) for(int i=H[u],v=to[i];i;i=nxt[i],v=to[i])

#define si(x) (int)x.size()

#define pb push_back

#define mp make_pair

#define mt make_tuple

#define X first

#define Y second

#define inf 1000000000

using namespace std;

template<class T> inline void read(T&x){char c;bool fu=0;for(c=getchar();c<=32;c=getchar());if(c=='-')fu=1,c=getchar();for(x=0;c>32;c=getchar())x=x*10+c-'0';if(fu)x*=-1;}

template<class T> inline void read(T&x,T&y){read(x);read(y);}

template<class T> inline void read(T&x,T&y,T&z) {read(x,y);read(z);}

template<class T> inline void MAX(T&x,T y){if(x<y)x=y;}

template<class T> inline void MIN(T&x,T y){if(x>y)x=y;}

typedef long long ll;

typedef pair<int,int> pii;

typedef tuple<int,int,int> tiii;

//head

double ans,n,d,t;

void work(double n,double d,double t){

	if(n==0)return;

	ans+=(d+d+(2*n-1)*t)/2.;

	double dd=((2*n+2.)*d+5*t)/2./n,tt=(t*(4.+2*n)/2./n);

	work(n-1,dd,tt);

}

int main() {

	scanf("%lf%lf%lf",&n,&d,&t);

	work(n,d,t);

	printf("%.12lf\n",ans);

	return 0;

}

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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

#include <iostream>

#include <algorithm>

#include <cstring>

#define N 200010

using namespace std;



long double ans = 0;

long double a[N], d[N];



int main() {

	int n, d1, x;

	scanf("%d%d%d", &n, &d1, &x);

	a[0] = d1; d[0] = x;

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

		a[i + 1] = ((2.0 * (n - i) + 2) * a[i] + 5.0 * d[i]) / (2.0 * (n - i));

		d[i + 1] = (2.0 * (n - i) + 4) * d[i] / 2.0 / (n - i);

//cout << a[i] << ' ' << d[i] << endl;

		ans += (2.0 * (n - i) * a[i] + ((n - i) * (2.0 * (n - i) - 1)) * d[i]) / (2.0 * (n - i));

	}

	printf("%.15f\n", (double)ans);

}

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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

#include<algorithm>

#include<cstring>

#include<iostream>

#include<cstdio>

#include<cstdlib>

using namespace std;



int N; double D,X;



inline int gi()

{

	char ch; int ret = 0,f = 1;

	do ch = getchar(); while (!(ch >= '0'&&ch <= '9')&&ch != '-');

	if (ch == '-') f = -1,ch = getchar();

	do ret = ret*10+ch-'0',ch = getchar(); while (ch >= '0'&&ch <= '9');

	return ret*f;

}



inline double calc(int n,double d,double x)

{

	if (n == 0) return 0;

	else return calc(n-1,(2*d+2*n*d+5*x)/(2*n),(2*x)/n+x)+d+(2*n-1)*x/2;

}



int main()

{

	//freopen("F.in","r",stdin);

	//freopen("F.out","w",stdout);

	N = gi(); D = gi(); X = gi();

	cout << fixed << setprecision(10) << calc(N,D,X) << endl;

	return 0;

}


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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

using namespace std;



int n;

double d0, d;



int main() {

	double ans = 0.0;

	cin >> n >> d0 >> d;

	n = n << 1;

	d0 -= d;

	for( ; n >= 2; n -= 2 ) {

		ans += d0 + d * (n + 1) / 2.0;

		double nd0 = d0 + (2 * d0 + 3 * d) / n;

		double nd = d + (4 * d) / n;

		d0 = nd0, d = nd;

	}

	cout << setprecision(20) << fixed << ans << endl;

}






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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

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

using namespace std;

double solve(int n, double d, double x) {

	if (n == 0) return 0;

	double res = d + (2 * n - 1) * x / 2;

	double dd = ((2 * n + 2) * d + 5 * x) / 2 / n;

	double xx = (n + 2) * x / n;

	return res + solve(n - 1, dd, xx);

}

int main() {

	int n, d, x;

	scanf("%d%d%d", &n, &d, &x);

	double ans = solve(n, d, x);

	printf("%.10f\n", ans);

}




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

#include <cstdlib>

#include <algorithm>



typedef long long LL;



double ans;



double calc(LL n,double sum)

{

	if(n == 1) return sum / (2 * n);

	else return calc(n - 1, sum - sum / (n * n)) + sum / (2 * n);

}

int main()

{

	LL n, d, x;

	

	scanf("%lld%lld%lld", &n, &d, &x);

	printf("%.10lf", calc(n, (2 * d + (2 * n - 1) * x) * n));

	return 0;

}