stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int main() {

    long long n,w;    cin>>n>>w;

    long long dp[100005];

    memset(dp, 1e9+1, sizeof(dp));

    long long mx_till_now=0;

    dp[0]=0;

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

        long long wi,vi;cin>>wi>>vi;

        for(long long j=mx_till_now;j>=0;j--)if( dp[j]!=1e9+1 && (dp[j] + wi==1e9+1 ||(dp[j] + wi)<=w )){

                dp[j+vi] = min ( dp[j+vi] , dp[j] + wi );

                mx_till_now=max(mx_till_now,j+vi);

        }

    }   

    cout<<mx_till_now;

    

    return 0;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;

ll K[105][100005];



ll knapSack(ll n,ll v[],ll W,ll w[],ll tot)

{

    for (ll i=0; i<=n; i++)

    {

        for (ll pr=0; pr<=tot; pr++)

        {

            if (i==0 && pr==0)

                K[i][pr]=0;

            else if(i==0)

                K[i][pr]=1e11;

            /*else if(w[i-1]<=wt)

                K[i][wt]=max(v[i-1]+K[i-1][wt-w[i-1]],K[i-1][wt]);*/

            else if(v[i-1]<=pr)

                K[i][pr]=min(w[i-1]+K[i-1][pr-v[i-1]],K[i-1][pr]);

            else

                K[i][pr]=K[i-1][pr];

        }

    }

    ll val=0;

	for(ll pr=0; pr<=tot; pr++)

		if(K[n][pr]<=W)

            val=pr;

	return val;

}



int main()

{

    ll n,W;

    cin>>n>>W;

    ll v[n+5],w[n+5];

    ll tot=0;

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

        cin>>w[i]>>v[i];

        tot+=v[i];

    }

    ll ans=knapSack(n,v,W,w,tot);

    cout<<ans<<endl;

    return 0;

}


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

using namespace std;

typedef unsigned long long ull;

typedef pair<int, int> pii;

const int INF = 0x3f3f3f3f;

const int maxn = 1e5 + 9;

inline int read()

{

    int data = 0, f = 1;

    char ch = getchar();

    while (!isdigit(ch))

    {

        if (ch == '-')

            f = -1;

        ch = getchar();

    }

    while (isdigit(ch))

    {

        data = (data << 3) + (data << 1) + ch - '0';

        ch = getchar();

    }

    return f * data;

}



int v[109], p[1009];

ull dp[maxn];

int main()

{

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

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

    //std::ios::sync_with_stdio(false);

    //std::cin.tie(0);

    int n = read(), w = read();

    for (int i = 1; i <= n; ++i)

        p[i] = read(), v[i] = read();

    for (ull i = 1; i < maxn; ++i)

        dp[i] = INF;

    for (int i = 1; i <= n; ++i)

        for (int j = maxn - 1; j >= v[i]; --j)

            dp[j] = min(dp[j], dp[j - v[i]] + p[i]);

    for (int i = maxn - 1; i >= 0; --i)

        if (dp[i] <= w)

        {

            cout << i << '\n';

            break;

        }

    //fclose(stdin);

    //fclose(stdout);

    return 0;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;

ll K[105][100005];



ll knapSack(ll n,ll v[],ll W,ll w[],ll tot)

{

    for (ll i=0; i<=n; i++)

    {

        for (ll pr=0; pr<=tot; pr++)

        {

            if (i==0 && pr==0)

                K[i][pr]=0;

            else if(i==0)

                K[i][pr]=1e11;

            /*else if(w[i-1]<=wt)

                K[i][wt]=max(v[i-1]+K[i-1][wt-w[i-1]],K[i-1][wt]);*/

            else if(v[i-1]<=pr)

                K[i][pr]=min(w[i-1]+K[i-1][pr-v[i-1]],K[i-1][pr]);

            else

                K[i][pr]=K[i-1][pr];

        }

    }

    ll val=0;

	for(ll pr=0; pr<=tot; pr++)

		if(K[n][pr]<=W)

            val=pr;

	return val;

}



int main()

{

    ll n,W;

    cin>>n>>W;

    ll v[n+5],w[n+5];

    ll tot=0;

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

        cin>>w[i]>>v[i];

        tot+=v[i];

    }

    ll ans=knapSack(n,v,W,w,tot);

    cout<<ans<<endl;

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstring>

using namespace std;



typedef long long ll;



const int maxn = 105, maxw = 1e9 + 5, maxv = 1e3 + 5;



int main(int argc, const char * argv[])

{

    ll n, W, w[maxn], v[maxn], dp[maxv*maxn], ans = 0;

    //memset(dp, maxw, sizeof dp);

    for (int i = 0; i < maxv * maxn; i++)

        dp[i] = maxw;

    cin >> n >> W;

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

        scanf("%lld %lld", &w[i], &v[i]);



    dp[0] = 0;

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

        for (int j = maxv * maxn - 1; j >= v[i]; j--) {

            dp[j] = min(dp[j], dp[j-v[i]] + w[i]);

            if (dp[j] <= W)

                ans = max(ans, (ll)j);

        }

    }

    

    cout << ans << endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;

ll K[105][100005];



ll knapSack(ll n,ll v[],ll W,ll w[],ll tot)

{

    for (ll i=0; i<=n; i++)

    {

        for (ll pr=0; pr<=tot; pr++)

        {

            if (i==0 && pr==0)

                K[i][pr]=0;

            else if(i==0)

                K[i][pr]=1e11;

            /*else if(w[i-1]<=wt)

                K[i][wt]=max(v[i-1]+K[i-1][wt-w[i-1]],K[i-1][wt]);*/

            else if(v[i-1]<=pr)

                K[i][pr]=min(w[i-1]+K[i-1][pr-v[i-1]],K[i-1][pr]);

            else

                K[i][pr]=K[i-1][pr];

        }

    }

    ll val=0;

	for(ll pr=0; pr<=tot; pr++)

		if(K[n][pr]<=W)

            val=pr;

	return val;

}



int main()

{

    ll n,W;

    cin>>n>>W;

    ll v[n+5],w[n+5];

    ll tot=0;

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

        cin>>w[i]>>v[i];

        tot+=v[i];

    }

    ll ans=knapSack(n,v,W,w,tot);

    cout<<ans<<endl;

    return 0;

}


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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int maxn = 1e5+10;

const int INF = 1e9+10;

int f[maxn];

int w[105],v[105];

signed main(){

	ios::sync_with_stdio(0);

	cin.tie(0);

	int n,W;

	cin >> n >> W;

	for(int i = 1;i < maxn;i++)f[i] = INF;

	for(int i = 1;i <= n;i++)cin >> w[i] >> v[i];

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

		for(int j = maxn-1;j >= 0;j--)if(j >= v[i])f[j] = min(f[j],f[j-v[i]] + w[i]);

	}

	int ans = 0;

	for(int i = 0;i < maxn;i++)if(f[i] <= W)ans = max(ans,i);

	cout << ans;

	return 0;

}


// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

typedef long long int ll;

ll K[105][100005];



ll knapSack(ll n,ll v[],ll W,ll w[],ll tot)

{

    for (ll i=0; i<=n; i++)

    {

        for (ll pr=0; pr<=tot; pr++)

        {

            if (i==0 && pr==0)

                K[i][pr]=0;

            else if(i==0)

                K[i][pr]=1e11;

            /*else if(w[i-1]<=wt)

                K[i][wt]=max(v[i-1]+K[i-1][wt-w[i-1]],K[i-1][wt]);*/

            else if(v[i-1]<=pr)

                K[i][pr]=min(w[i-1]+K[i-1][pr-v[i-1]],K[i-1][pr]);

            else

                K[i][pr]=K[i-1][pr];

        }

    }

    ll val=0;

	for(ll pr=0; pr<=tot; pr++)

		if(K[n][pr]<=W)

            val=pr;

	return val;

}



int main()

{

    ll n,W;

    cin>>n>>W;

    ll v[n+5],w[n+5];

    ll tot=0;

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

        cin>>w[i]>>v[i];

        tot+=v[i];

    }

    ll ans=knapSack(n,v,W,w,tot);

    cout<<ans<<endl;

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<vector>

#include<map>

#include<algorithm>

#include<string>



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

#define REP(i,n)   FOR(i,0,n)

#define MOD 1000000007



using namespace std;



typedef long long int ll;



const ll INF=(ll)1e18;

const int MAXV=100000;



int N,W;



int main(){

    cin >> N >> W;



    ll dp[N+1][MAXV+1];

    REP(i,N+1)REP(j,MAXV+1)dp[i][j] = INF;



    dp[0][0] = 0;



    FOR(i,1,N+1){

      ll w,v;

      cin >> w >> v;

      REP(j,MAXV+1){

        if(dp[i-1][j] == INF)continue;



        // i個目を選ばない

        if(dp[i][j] > dp[i-1][j])dp[i][j] = dp[i-1][j];



        // i個目を選ぶ

        if(dp[i-1][j] + w <= W){

          if(dp[i][j+v] > dp[i-1][j] + w)dp[i][j+v] = dp[i-1][j] + w;

        }

      }



    }

    ll ans = 0;

    for(int i = MAXV; i >= 0; i--){

      if(dp[N][i] != INF){

        ans = i;

        break;

      }

    }

    cout << ans << endl;

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;



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

#define REP(i,n)   FOR(i,0,n)

#define MOD 1000000007



typedef long long int ll;



const ll INF=(ll)1e18;

//const int INF=(1<<30);



int MAX_V = 100000;



int main(){

  int N,W;

  cin >> N >> W;

  vector<int> w(N),v(N);

  REP(i,N){

    cin >> w[i] >> v[i];

  }



  vector<ll> dp(MAX_V+1,INF);

  dp[0]=0;



  REP(i,N){

    for(int j = MAX_V; j >=0; j--){

      if(dp[j]==INF)continue;

      if(dp[j]+w[i]>W)continue;

      dp[j+v[i]] = min(dp[j+v[i]], dp[j]+w[i]); 

    }

  }



  int ans=0;

  REP(i,MAX_V+1){

    if(dp[i]==INF)continue;

    ans = max(ans,i);

  }

  cout << ans << endl;

}




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

using namespace std;



int main(){

  int N,W;

  cin >> N >> W;



  vector<long long> w(N);

  vector<int> v(N);

  for (int i = 0; i < N; i++)

  {

    cin >> w[i] >> v[i];

  }



  const long long INF = 1e12;

  long long dp[N+1][100009];

  for (int j = 0; j <= 100000; j++)

  {

    dp[0][j] = INF;

  }

  dp[0][0] = 0;

  for (int i = 1; i <= N; i++)

  {

    for (int j = 0; j <= 100000; j++)

    {

      if(j-v[i-1]>=0){

        dp[i][j] = min(dp[i-1][j],dp[i-1][j-v[i-1]]+w[i-1]);

      }

      else{

        dp[i][j] = dp[i-1][j];

      }

    }

  }



  int ans = 0;

  for (int i = 0; i <= N; i++)

  {

    for (int j = 0; j <= 100000; j++)

    {

      if(dp[i][j]<=W) ans = max(ans,j);

    }

  }

  cout << ans << endl;

}


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

#include <algorithm>

#include <vector>

#include <utility>

#define ran(i, s, g) for (i = s; i <= g; i++)

using namespace std;

using ll = long long;

const ll MOD = 1e9 + 7;



int main(void)

{

    int N, W;

    vector<int> w(110);

    vector<int> v(110);

    vector<ll> dp(100010, MOD);

    int i, j, k;

    ll ans = 0;

    ll sum = 0;



    cin >> N >> W;



    ran(i, 1, N)

    {

        cin >> w[i] >> v[i];

        sum += v[i];

    }



    dp[0] = 0;



    for (i = 1; i <= N; i++)

    {

        for (j = sum; j >= v[i]; j--)

        {

            dp[j] = min(dp[j], dp[j - v[i]] + w[i]);

        }

    }



    for (i = 1; i <= sum; i++)

    {

        if (dp[i] <= W)

        {

            ans = max(ans, (ll)i);

        }

    }



    cout << ans << endl;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <algorithm>

#include <vector>

#include <utility>

#define ran(i, s, g) for (i = s; i <= g; i++)

using namespace std;

using ll = long long;

const ll MOD = 1e9 + 7;



int main(void)

{

    int N, W;

    vector<int> w(110);

    vector<int> v(110);

    static int dp[110][100010];

    int i, j, k;

    ll ans = 0;

    ll sum = 0;



    cin >> N >> W;



    ran(i, 1, N)

    {

        cin >> w[i] >> v[i];

        sum += v[i];

    }



    ran(j, 1, sum)

    {

        dp[0][j] = MOD;

    }



    dp[0][0] = 0;



    ran(i, 1, N)

    {

        dp[i][0] = 0;

        ran(j, 1, 100005)

        {

            if (j - v[i] >= 0)

            {

                dp[i][j] = min(dp[i - 1][j], dp[i - 1][j - v[i]] + w[i]);

            }

            else

            {

                dp[i][j] = dp[i - 1][j];

            }

        }

    }



    for (i = 1; i <= sum; i++)

    {

        if (dp[N][i] <= W)

        {

            ans = max(ans, (ll)i);

        }

    }



    cout << ans << endl;

}

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

#include <algorithm>

#include <vector>

#include <utility>

#define ran(i, s, g) for (i = s; i <= g; i++)

using namespace std;

using ll = long long;

const ll MOD = 1e9 + 7;



int main(void)

{

    int N, W;

    vector<int> w(110);

    vector<int> v(110);

    vector<ll> dp(100010, MOD);

    int i, j, k;

    ll ans = 0;

    ll sum = 0;



    cin >> N >> W;



    ran(i, 1, N)

    {

        cin >> w[i] >> v[i];

        sum += v[i];

    }



    dp[0] = 0;



    for (i = 1; i <= N; i++)

    {

        for (j = sum; j >= v[i]; j--)

        {

            dp[j] = min(dp[j], dp[j - v[i]] + w[i]);

        }

    }



    for (i = 1; i <= sum; i++)

    {

        if (dp[i] <= W)

        {

            ans = max(ans, (ll)i);

        }

    }



    cout << ans << endl;

}

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

using namespace std;

#define ll long long

#define VV vector

#define pb push_back

#define bitc  __builtin_popcountl

#define m_p make_pair

#define inf 200000000000000

#define MAXN 1000001

#define eps 0.0000000001

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

string char_to_str(char c){string tem(1,c);return tem;}

// string to integer stoi()

// string to long long stoll()

// string.substr(position,length);

// integer to string to_string();



//////////////



#define S second

#define F first

#define int long long  



//////////



int ans[101][100000+1]={};

signed main()

{

    fastio;

    // #ifndef ONLINE_JUDGE

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

    //     freopen("outputf.in","w",stdout);

    // #endif

    int n,W;

    cin>>n>>W;

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

        for(int j=1;j<=100000;++j)

            ans[i][j]=inf;

    for(int i=1;i<=n;++i)

    {

        int w,v;

        cin>>w>>v;

        for(int j=0;j<=100000;++j)

        {

            ans[i][j]=ans[i-1][j];

            if(j-v>=0)

            ans[i][j]=min(ans[i][j],ans[i-1][j-v]+w);

        }

    }

    int an=0;

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

        if(ans[n][i]<=W)

            an=i;

    }

    cout<<an;

}

// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

#define ll long long

#define VV vector

#define pb push_back

#define bitc  __builtin_popcountl

#define m_p make_pair

#define inf 200000000000000

#define MAXN 1000001

#define eps 0.0000000001

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);

string char_to_str(char c){string tem(1,c);return tem;}

// string to integer stoi()

// string to long long stoll()

// string.substr(position,length);

// integer to string to_string();



//////////////



#define S second

#define F first

#define int long long  



///////////// 



signed main()

{

	fastio;

	#ifdef ANIKET_GOYAL

		freopen("inputf.in","r",stdin);

		freopen("outputf.in","w",stdout);

	#endif

	int n,w;

	cin>>n>>w;

	int v[100001]={};

	for(int i=0;i<=100000;++i)

		v[i]=inf;

	v[0]=0;

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

	{

		int we,ha;

		cin>>we>>ha;

		for(int j=100000;j-ha>=0;--j)

		{

			v[j]=min(v[j],v[j-ha]+we);

		}

	}

	int ans=0;

	for(int i=0;i<=100000;++i)

	{

		if(v[i]<=w)

			ans=i;

	}

	cout<<ans;

}

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

using namespace std;

const long long mod=1e11+7;

long long dp[103][100004];



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);

    int n,w;

    cin>>n>>w;

    int a[103],b[103];

    for(int i=0;i<n;i++)cin>>a[i]>>b[i];

    for(int i=0;i<n+1;i++)for(int j=0;j<100004;j++)dp[i][j]=mod;

    dp[0][0]=0;

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

        if(j>=b[i])dp[i+1][j]=min(dp[i][j],dp[i][j-b[i]]+a[i]);

        else dp[i+1][j]=dp[i][j];

    }

    

    long long res=0;

    for(int j=0;j<100004;j++)if(dp[n][j]<=w)res=j;

    cout<<res<<endl;

    

    return 0;

}


// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

const int mod=1e9+7;



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);

    int n,w;

    cin>>n>>w;

    int a[103],b[103];

    int dp[2][100004];

    for(int i=0;i<n;i++)cin>>a[i]>>b[i];

    for(int i=0;i<2;i++)for(int j=0;j<100004;j++)dp[i][j]=mod;

    dp[0][0]=0;

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

        if(j>=b[i])dp[(i+1)&1][j]=min(dp[i&1][j],dp[i&1][j-b[i]]+a[i]);

        else dp[(i+1)&1][j]=dp[i&1][j];

    }

    

    int res=0;

    for(int j=0;j<100004;j++)if(dp[n&1][j]<=w)res=j;

    cout<<res<<endl;

    

    return 0;

}


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

#define ll long long

using namespace std;

const int maxn = 2e5+5;

inline void fastio() {ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);}



int _;



int main()

{

    //fastio();

    double r;

    scanf("%lf",&r);

    printf("%.8f\n",r*2*acos(-1));

    return 0;

}


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

#include<cmath>

#define ll long long

using namespace std;

const int maxn = 2e5+5;



int _;



int main()

{

  //fastio();

  double r;

  scanf("%lf",&r);

  printf("%.8f\n",(double)r*2*acos(-1));

  return 0;

}


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

#define ll long long

using namespace std;

const int maxn = 2e5+5;

//inline void fastio() {ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);}



int _;



int main()

{

  //fastio();

  double r;

  scanf("%lf",&r);

  printf("%.8f\n",r*2*acos(-1));

  return 0;

}

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

#include<cmath>

#define ll long long

using namespace std;

const int maxn = 2e5+5;



int _;



int main()

{

  //fastio();

  double r;

  scanf("%lf",&r);

  printf("%.8f\n",(double)r*2*acos(-1));

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string.h>

# define P 3.141592653

#include <iomanip>



using namespace std;

int main()

{

	int r;

	double s;

	while(cin>>r)

	{

		s=2*P*r;

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

	}

	return 0;

} 

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

#include<cmath>

#define pi acos(-1)

using namespace std;



int main()

{

    int r;

    double area;

    scanf("%d", &r);

    printf("%lf", 2*pi*r);

    return 0;

}


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

#include<iostream>

#include<string>

#include<vector>

#include<algorithm>

#include<cmath>

#include<cstdio>



using namespace std;



int main(void) {

	int r;

	cin >> r;

	printf("%lf\n", (double)(2 * r)*M_PI);

}

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

#include<cstdio>



using namespace std;



double pi = M_PI;



int main(void) {

	int r;

	scanf("%d", &r);

	printf("%lf\n", 2 * pi * r);

}

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

#include<iostream>

#include<string>

#include<vector>

#include<algorithm>

#include<cmath>

#include<cstdio>



using namespace std;



int main(void) {

	double r;

	scanf("%lf", &r);

	printf("%lf\n", 2 * r*M_PI);

}

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

#include<cstdio>



using namespace std;



double pi = M_PI;



int main(void) {

	int r;

	scanf("%d", &r);

	printf("%lf\n", 2 * pi * r);

}

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

#include<iostream>

#include<string>

#include<vector>

#include<algorithm>

#include<cmath>

#include<cstdio>



using namespace std;



double pi = M_PI;



int main(void) {

	int r;

	scanf("%d", &r);

	printf("%lf\n", 2 * pi * r);

}

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

#include<cstdio>



using namespace std;



double pi = M_PI;



int main(void) {

	int r;

	scanf("%d", &r);

	printf("%lf\n", 2 * pi * r);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main()

{double a,x,p;

p=3.14159265358979323846;

scanf("%lf",&a);

x=2*a*p;

printf("%.20lf",x);}


// Optimized solution to the same problem (faster):
#include<stdio.h>



#include<math.h>





int main()

{

     double x;

    scanf("%lf",&x);

    printf("%lf",2*3.141592*x);

}


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

using namespace std;

int main()

{

  int x;

  cin>>x;

  return cout<<fixed<<setprecision(15)<<2*M_PI*x<<endl,0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<math.h>

int main(){int x;while(scanf("%d",&x)!=0)return printf("%.15lf",2*M_PI*x),0;}

// Fastest known solution for this problem:
// Original C++ solution (slower):
///HELLO THERE~!

///CREATED BY MD SADMAN MEHEDI SIVAN(IUT CSE-SWE^19)



#include <bits/stdc++.h>



#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define read freopen("blue.txt","r",stdin);

#define write freopen("red.txt","w",stdout);





typedef long long ll;



using namespace std;





int main()



{



    fastio;

    double pie=2*acos(0.0);



    double a;

    cin>>a;

    double result=2.0*pie*a;



    cout<<fixed<<setprecision(22)<<result;





    return 0;

}


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



using namespace std;



const double P = 3.14159265;



int main()

{

    double a;

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

        printf("%f\n", a*P*2.0);

    }

    return 0;

}


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



using namespace std;

int main()

{

    ios_base::sync_with_stdio(false);

    long double r,s;

    cin>>r;

    s=2*3.141592653589*r;

    printf("%.12Lf",s);





    return 0;

}




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



using namespace std;



const double P = 3.14159265;



int main()

{

    double a;

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

        printf("%f\n", a*P*2.0);

    }

    return 0;

}


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

using namespace std;

int main()

{

    

    

    

    int R;

    double pi=3.14159265358979323846,c;

    cin>>R;

    c=2*pi*R;

    printf("%0.20lf",c);

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>

#define k 6.28318530717958623200

int main()

{

    int r;

    double c;

    scanf("%d",&r);

    printf("%lf\n",r*k);



    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<map>

#include<set>

#include<queue>

#include<cmath>

#include<cstdio>

#include<vector>

#include<string>

#include<cstring>

#include<iostream>

#include<algorithm>

#define lc (x<<1)

#define rc (x<<1|1)

#define gc getchar()//(p1==p2&&(p2=(p1=buf)+fread(buf,1,size,stdin),p1==p2)?EOF:*p1++)

#define mk make_pair

#define pi pair<int,int>

using namespace std;

typedef long long ll;

typedef unsigned long long ull;

const int N=2e5+10,size=1<<20;



//char buf[size],*p1=buf,*p2=buf;

template<class o> void qr(o &x) {

	char c=gc; x=0; int f=1;

	while(!isdigit(c)){if(c=='-')f=-1; c=gc;}

	while(isdigit(c)) x=x*10+c-'0',c=gc;

	x*=f;

}

template<class o> void qw(o x) {

	if(x/10) qw(x/10);

	putchar(x%10+'0');

}

template<class o> void pr1(o x) {

	if(x<0)x=-x,putchar('-');

	qw(x); putchar(' ');

}

template<class o> void pr2(o x) {

	if(x<0)x=-x,putchar('-');

	qw(x); puts("");

}



int main() {

	int n; qr(n);

	printf("%.7lf\n",2*n*acos(-1.0)); 

	return 0;

}




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

using namespace std;



int main() {

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

	printf("%.5lf\n",n*6.28318530717958623200); 

	return 0;

}




// Fastest known solution for this problem: