stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#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;

	}

}


// Optimized solution to the same problem (faster):
#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;

	}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}






// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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);

}




// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>



using namespace std;



int n;

long double d,x,ans;



int main()

{

	cin>>n>>d>>x;

	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("%.10lf\n",(double)ans); 

} 

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



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

{

	if(n == 1)

	{

		return (d + d + x) / 2;

	}

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

}

int n;

double d, x;





int main()

{

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

	printf("%.15f\n", Cal(n, d, x));

	return 0;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



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

{

	if(n == 1)

	{

		return (d + d + x) / 2;

	}

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

}

int n;

double d, x;





int main()

{

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

	printf("%.15f\n", Cal(n, d, x));

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

int n;

double d,x;

int main()

{

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

	int m=2*n;

	double ans=0;

	while(m)

	{

		ans+=(2.0*x+(1.0*m-1.0)*d)/2.0;

		x=((1.0*m+2.0)*x+5.0*d)/(1.0*m);

		d=(1.0*m+4.0)*d/(1.0*m);

		m-=2;

	}

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

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

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;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

int n;

double d,x;

int main()

{

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

	int m=2*n;

	double ans=0;

	while(m)

	{

		ans+=(2.0*x+(1.0*m-1.0)*d)/2.0;

		x=((1.0*m+2.0)*x+5.0*d)/(1.0*m);

		d=(1.0*m+4.0)*d/(1.0*m);

		m-=2;

	}

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

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#include <iomanip>

using namespace std;



typedef long long LL;

typedef long double LD;



LD calc(int n, LD d1, LD d) {

	if (n == 1) {

		return d1 + d / 2;

	}

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

}



int main() {

	ios::sync_with_stdio(false);

	cin.tie(0);

	cout.tie(0);

	

	int n;

	LD d1, x;

	cin >> n >> d1 >> x;

	cout << fixed << setprecision(10) << calc(n, d1, x) << endl;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

int n;

double d,x;

int main()

{

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

	int m=2*n;

	double ans=0;

	while(m)

	{

		ans+=(2.0*x+(1.0*m-1.0)*d)/2.0;

		x=((1.0*m+2.0)*x+5.0*d)/(1.0*m);

		d=(1.0*m+4.0)*d/(1.0*m);

		m-=2;

	}

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

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
// LNU_Algotesters

#include <iostream>

#include <sstream>

#include <iomanip>

#include <cstdio>

#include <cstdlib>

#include <cmath>

#include <cctype>

#include <cstring>

#include <vector>

#include <list>

#include <queue>

#include <deque>

#include <stack>

#include <map>

#include <set>

#include <algorithm>

#include <iterator>

#include <bitset>

#include <ctime>

#include <fstream>

#include <complex>

using namespace std;



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

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

#define ITER(it,a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); it++)

#define FILL(a,value) memset(a, value, sizeof(a))



#define SZ(a) (int)a.size()

#define ALL(a) a.begin(), a.end()

#define PB push_back

#define MP make_pair



typedef long long LL;

typedef vector<int> VI;

typedef pair<int, int> PII;



const double PI = acos(-1.0);

const int INF = 1000 * 1000 * 1000 + 7;

const LL LINF = INF * (LL) INF;



const int MAX = 2000 + 47;

const double EPS = 1e-9;









int main()

{

    

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

    //ios::sync_with_stdio(false); cin.tie(0);

    

    int n, d, x;

    cin >> n >> d >> x;

    double D = (2 * d + (2 * n - 1) * 1LL * x) * .5;

    double ans = .0;

    RFOR(i, n+1, 1)

    {

        ans += D;

        D += D / i;

    }

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

    return 0;

}








// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

int n;

double d,x;

int main()

{

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

	int m=2*n;

	double ans=0;

	while(m)

	{

		ans+=(2.0*x+(1.0*m-1.0)*d)/2.0;

		x=((1.0*m+2.0)*x+5.0*d)/(1.0*m);

		d=(1.0*m+4.0)*d/(1.0*m);

		m-=2;

	}

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

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>

#include <sstream>

#include <iomanip>

#include <cstdio>

#include <cstdlib>

#include <cmath>

#include <cctype>

#include <cstring>

#include <vector>

#include <list>

#include <queue>

#include <deque>

#include <stack>

#include <map>

#include <set>

#include <algorithm>

#include <iterator>

#include <bitset>

#include <ctime>

#include<unordered_set>

#include<complex>

using namespace std;



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

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

#define ITER(it,a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); it++)

#define FILL(a,value) memset(a, value, sizeof(a))



#define SZ(a) (int)a.size()

#define ALL(a) a.begin(), a.end()

#define PB push_back

#define MP make_pair



typedef long long LL;

typedef vector<int> VI;

typedef pair<int, int> PII;



const double PI = acos(-1.0);

const int INF = 1000 * 1000 * 1000 + 7;

const LL LINF = INF * (LL)INF;



const int MOD = 1000 * 1000 * 1000 + 7;

const int MAX = 1000 * 1000 + 47;



int main()

{

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

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

	ios::sync_with_stdio(false); cin.tie(0);

	int n;

	double d0, x;

	cin >> n >> d0 >> x;



	double ans = 0;

	RFOR(k, n + 1, 1)

	{

		//cout << d0 << " " << x << endl;

		ans += (2 * d0 + x * (2 * k - 1)) * k / (2.0 * k);

		if (k == 1) break;



		double x1 = (2 * x + k * x) / k;

		double d1 = (2 * (k + 1) * d0 + 5 * x) / (2.0 * k);

		x = x1;

		d0 = d1;

	}



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

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

#include<algorithm>

using namespace std;

int n;

double d,x;

int main()

{

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

	int m=2*n;

	double ans=0;

	while(m)

	{

		ans+=(2.0*x+(1.0*m-1.0)*d)/2.0;

		x=((1.0*m+2.0)*x+5.0*d)/(1.0*m);

		d=(1.0*m+4.0)*d/(1.0*m);

		m-=2;

	}

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

	return 0;

}

// Fastest known solution for this problem: