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

using namespace std;

/*

#define mod 7

typedef long long ll;



ll fact[1000006], inv[1000006];



ll fp(ll base, ll exp)

{

    if (exp == 0)

        return 1;

    ll ans = fp(base, exp / 2);

    ans = (ans * ans) % mod;

    if (exp % 2 != 0)

        ans = (ans * (base % mod)) % mod;

    return ans;

}



void calcFacAndInv(ll n)

{

    fact[0] = inv[0] = 1;

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

    {

        fact[i] = (i * fact[i - 1]) % mod;

        inv[i] = fp(fact[i], mod - 2);

    }

}



ll ncr(ll n, ll r)

{

    return ((fact[n] * inv[r]) % mod * inv[n - r]) % mod;

}



ll npr(ll n, ll r)

{

    return (fact[n] * inv[n - r]) % mod;

}



int main()

{

    calcFacAndInv(100000);

     cout<<inv[3];

    return 0;

}

*/





// GCD



int gcd(long long a,long long b)

{

    if (b==0)

        return a;

    return gcd (b,a%b);

}

//fast power

/*

#define mod 1000000007

long long fp(long long  base, long long exp)

{

    if (exp == 0)

        return 1;

    long long  ans = fp(base, exp / 2);

    ans = (ans * ans);

    if (exp % 2 != 0)

        ans = (ans * (base )) ;

    return ans;

}

*/

//prime factoriation

/*

set<int >s;

bool prime factorization (int x)

{

    for (int j=2; j*j<=x; ++j)

    {

        while (x%j==0)

        {

            s.insert(j);

            x/=j;

        }

    }

    if (x>1)

    {

        s.insert(x);

    }

    if (s.size()==2)

        return true ;

    else

        return false ;

}



#define ll long long

int a,b,q,p,n;

int countDivisorss(int x,int y)

{

    ll cnt = 0;

    for (int i = min(x,y); i <= sqrt(n); i++)

    {

        if (x % i == 0&&y%i==0)

        {

            if (x / i == i||y / i == i)

                cnt++;



            else

                cnt = cnt + 2;

        }

    }

    return cnt;

}

int countDivisors(int x)

{

    ll cnt = 0;

    int tmp=n;

    if (n-x>10000000)  tmp=sqrt(n);

    for (int i = x; i <= tmp; i++)

    {

        if (x % i == 0)

        {

         if (x/i==i)

            cnt++;

         else

            cnt = cnt + 2;

        }

    }

    return cnt;

}

*/



/*

        int s =n/2,e=n-1;

        while (s<=e&&e<=n-1)

        {

            int mid =s+e/2;



            if (arr[mid]==arr[n/2])

            {

                s=mid;

                num +=mid -s;

            }

            else

                e=mid-1;

        }

        */









const int N = 1e5 + 5;



vector<int> adj[N];

bool visited[N];

int nodesNum;

void dfs(int node)

{

   if (visited[node])

       return;

   visited[node] = true;

   for (int child: adj[node])

       dfs(child);

}



int main()

{

   int n;

   cin>>n;

   if (n%2==0)

    cout<<n/2;

   else 

    cout<<n/2+1;

   return 0;

}






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



int main() {

	int x;

	scanf("%d", &x);

	

	if (x%2 == 0) {

		printf("%d", x/2);

	}

	else {

		printf("%d", (x/2) + 1);

	}

	return 0;

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

#define ll long long

using namespace std;



int main()

{ ll n;

cin>>n;

if(n%2==0)

    cout << n/2;

else

    cout << (n/2)+1 << endl;

    return 0;

}


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



int main() {

	int x;

	scanf("%d", &x);

	

	if (x%2 == 0) {

		printf("%d", x/2);

	}

	else {

		printf("%d", (x/2) + 1);

	}

	return 0;

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

using namespace std;

int main()

{

    int n;

    cin>>n;

    if(n%2==0){

        cout<<n/2;

    }

    else{

        cout<<n/2+1;

    }

    return 0;

}


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



int main() {

	int x;

	scanf("%d", &x);

	

	if (x%2 == 0) {

		printf("%d", x/2);

	}

	else {

		printf("%d", (x/2) + 1);

	}

	return 0;

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

using namespace std;

int main()

{

	int n;

	cin>>n;

	cout<<(n+1)/2;

}

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



int main() {

	int x;

	scanf("%d", &x);

	

	if (x%2 == 0) {

		printf("%d", x/2);

	}

	else {

		printf("%d", (x/2) + 1);

	}

	return 0;

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



#define ll long long

#define ld long double

#define ull unsigned long long

#define endl "\n"

#define MohamedMotaz ios::sync_with_stdio(0); cin.tie(0); ios_base::sync_with_stdio(0);



using namespace std;



















int main()

{

	MohamedMotaz;

	ll x;

	cin >> x;

	cout << ceil(x / 2.0);





}








































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

int main(){

	int x;

	

	scanf("%d",&x);

	if(x%2==0){

		printf("%d",x/2);

	}

	else {

		printf("%d",(x/2)+1);

	}

	

	

	

	return 0;

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

using namespace std;

typedef long long ll;   



int main()

{

    ll num;

    cin>>num;

    cout<<num/2 + num %2;

    return 0;

}

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

int main(){

	int x;

	

	scanf("%d",&x);

	if(x%2==0){

		printf("%d",x/2);

	}

	else {

		printf("%d",(x/2)+1);

	}

	

	

	

	return 0;

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

using namespace std;

/*

#define mod 7

typedef long long ll;



ll fact[1000006], inv[1000006];



ll fp(ll base, ll exp)

{

    if (exp == 0)

        return 1;

    ll ans = fp(base, exp / 2);

    ans = (ans * ans) % mod;

    if (exp % 2 != 0)

        ans = (ans * (base % mod)) % mod;

    return ans;

}



void calcFacAndInv(ll n)

{

    fact[0] = inv[0] = 1;

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

    {

        fact[i] = (i * fact[i - 1]) % mod;

        inv[i] = fp(fact[i], mod - 2);

    }

}



ll ncr(ll n, ll r)

{

    return ((fact[n] * inv[r]) % mod * inv[n - r]) % mod;

}



ll npr(ll n, ll r)

{

    return (fact[n] * inv[n - r]) % mod;

}



int main()

{

    calcFacAndInv(100000);

     cout<<inv[3];

    return 0;

}

*/





// GCD



int gcd(long long a,long long b)

{

    if (b==0)

        return a;

    return gcd (b,a%b);

}

//fast power

/*

#define mod 1000000007

long long fp(long long  base, long long exp)

{

    if (exp == 0)

        return 1;

    long long  ans = fp(base, exp / 2);

    ans = (ans * ans);

    if (exp % 2 != 0)

        ans = (ans * (base )) ;

    return ans;

}

*/

//prime factoriation

/*

set<int >s;

bool prime factorization (int x)

{

    for (int j=2; j*j<=x; ++j)

    {

        while (x%j==0)

        {

            s.insert(j);

            x/=j;

        }

    }

    if (x>1)

    {

        s.insert(x);

    }

    if (s.size()==2)

        return true ;

    else

        return false ;

}



#define ll long long

int a,b,q,p,n;

int countDivisorss(int x,int y)

{

    ll cnt = 0;

    for (int i = min(x,y); i <= sqrt(n); i++)

    {

        if (x % i == 0&&y%i==0)

        {

            if (x / i == i||y / i == i)

                cnt++;



            else

                cnt = cnt + 2;

        }

    }

    return cnt;

}

int countDivisors(int x)

{

    ll cnt = 0;

    int tmp=n;

    if (n-x>10000000)  tmp=sqrt(n);

    for (int i = x; i <= tmp; i++)

    {

        if (x % i == 0)

        {

         if (x/i==i)

            cnt++;

         else

            cnt = cnt + 2;

        }

    }

    return cnt;

}

*/



/*

        int s =n/2,e=n-1;

        while (s<=e&&e<=n-1)

        {

            int mid =s+e/2;



            if (arr[mid]==arr[n/2])

            {

                s=mid;

                num +=mid -s;

            }

            else

                e=mid-1;

        }

        */









const int N = 1e5 + 5;



vector<int> adj[N];

bool visited[N];

int nodesNum;

void dfs(int node)

{

   if (visited[node])

       return;

   visited[node] = true;

   for (int child: adj[node])

       dfs(child);

}



int main()

{

   int n;

   cin>>n;

   if (n%2==0)

    cout<<n/2;

   else 

    cout<<n/2+1;

   return 0;

}






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

int main(){

	int x;

	

	scanf("%d",&x);

	if(x%2==0){

		printf("%d",x/2);

	}

	else {

		printf("%d",(x/2)+1);

	}

	

	

	

	return 0;

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

#define ll long long

using namespace std;



int main()

{ ll n;

cin>>n;

if(n%2==0)

    cout << n/2;

else

    cout << (n/2)+1 << endl;

    return 0;

}


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

int main(){

	int x;

	

	scanf("%d",&x);

	if(x%2==0){

		printf("%d",x/2);

	}

	else {

		printf("%d",(x/2)+1);

	}

	

	

	

	return 0;

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

using namespace std;

int main()

{

    int n;

    cin>>n;

    if(n%2==0){

        cout<<n/2;

    }

    else{

        cout<<n/2+1;

    }

    return 0;

}


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

int main(){

	int x;

	

	scanf("%d",&x);

	if(x%2==0){

		printf("%d",x/2);

	}

	else {

		printf("%d",(x/2)+1);

	}

	

	

	

	return 0;

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

using namespace std;

int main()

{

	int n;

	cin>>n;

	cout<<(n+1)/2;

}

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

int main(){

	int x;

	

	scanf("%d",&x);

	if(x%2==0){

		printf("%d",x/2);

	}

	else {

		printf("%d",(x/2)+1);

	}

	

	

	

	return 0;

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



#define ll long long

#define ld long double

#define ull unsigned long long

#define endl "\n"

#define MohamedMotaz ios::sync_with_stdio(0); cin.tie(0); ios_base::sync_with_stdio(0);



using namespace std;



















int main()

{

	MohamedMotaz;

	ll x;

	cin >> x;

	cout << ceil(x / 2.0);





}








































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



int main()

{

    int N;

    scanf("%d", &N);

    

    if(N%2==0){

        printf("%d", N/2);

    }

    else{

        printf("%d", N/2+1);

    }

    

   

    

    return 0;

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

using namespace std;

typedef long long ll;   



int main()

{

    ll num;

    cin>>num;

    cout<<num/2 + num %2;

    return 0;

}

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



int main()

{

    int N;

    scanf("%d", &N);

    

    if(N%2==0){

        printf("%d", N/2);

    }

    else{

        printf("%d", N/2+1);

    }

    

   

    

    return 0;

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

using namespace std;

/*

#define mod 7

typedef long long ll;



ll fact[1000006], inv[1000006];



ll fp(ll base, ll exp)

{

    if (exp == 0)

        return 1;

    ll ans = fp(base, exp / 2);

    ans = (ans * ans) % mod;

    if (exp % 2 != 0)

        ans = (ans * (base % mod)) % mod;

    return ans;

}



void calcFacAndInv(ll n)

{

    fact[0] = inv[0] = 1;

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

    {

        fact[i] = (i * fact[i - 1]) % mod;

        inv[i] = fp(fact[i], mod - 2);

    }

}



ll ncr(ll n, ll r)

{

    return ((fact[n] * inv[r]) % mod * inv[n - r]) % mod;

}



ll npr(ll n, ll r)

{

    return (fact[n] * inv[n - r]) % mod;

}



int main()

{

    calcFacAndInv(100000);

     cout<<inv[3];

    return 0;

}

*/





// GCD



int gcd(long long a,long long b)

{

    if (b==0)

        return a;

    return gcd (b,a%b);

}

//fast power

/*

#define mod 1000000007

long long fp(long long  base, long long exp)

{

    if (exp == 0)

        return 1;

    long long  ans = fp(base, exp / 2);

    ans = (ans * ans);

    if (exp % 2 != 0)

        ans = (ans * (base )) ;

    return ans;

}

*/

//prime factoriation

/*

set<int >s;

bool prime factorization (int x)

{

    for (int j=2; j*j<=x; ++j)

    {

        while (x%j==0)

        {

            s.insert(j);

            x/=j;

        }

    }

    if (x>1)

    {

        s.insert(x);

    }

    if (s.size()==2)

        return true ;

    else

        return false ;

}



#define ll long long

int a,b,q,p,n;

int countDivisorss(int x,int y)

{

    ll cnt = 0;

    for (int i = min(x,y); i <= sqrt(n); i++)

    {

        if (x % i == 0&&y%i==0)

        {

            if (x / i == i||y / i == i)

                cnt++;



            else

                cnt = cnt + 2;

        }

    }

    return cnt;

}

int countDivisors(int x)

{

    ll cnt = 0;

    int tmp=n;

    if (n-x>10000000)  tmp=sqrt(n);

    for (int i = x; i <= tmp; i++)

    {

        if (x % i == 0)

        {

         if (x/i==i)

            cnt++;

         else

            cnt = cnt + 2;

        }

    }

    return cnt;

}

*/



/*

        int s =n/2,e=n-1;

        while (s<=e&&e<=n-1)

        {

            int mid =s+e/2;



            if (arr[mid]==arr[n/2])

            {

                s=mid;

                num +=mid -s;

            }

            else

                e=mid-1;

        }

        */









const int N = 1e5 + 5;



vector<int> adj[N];

bool visited[N];

int nodesNum;

void dfs(int node)

{

   if (visited[node])

       return;

   visited[node] = true;

   for (int child: adj[node])

       dfs(child);

}



int main()

{

   int n;

   cin>>n;

   if (n%2==0)

    cout<<n/2;

   else 

    cout<<n/2+1;

   return 0;

}






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



int main()

{

    int N;

    scanf("%d", &N);

    

    if(N%2==0){

        printf("%d", N/2);

    }

    else{

        printf("%d", N/2+1);

    }

    

   

    

    return 0;

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

#define ll long long

using namespace std;



int main()

{ ll n;

cin>>n;

if(n%2==0)

    cout << n/2;

else

    cout << (n/2)+1 << endl;

    return 0;

}


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



int main()

{

    int N;

    scanf("%d", &N);

    

    if(N%2==0){

        printf("%d", N/2);

    }

    else{

        printf("%d", N/2+1);

    }

    

   

    

    return 0;

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

using namespace std;

int main()

{

    int n;

    cin>>n;

    if(n%2==0){

        cout<<n/2;

    }

    else{

        cout<<n/2+1;

    }

    return 0;

}


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



int main()

{

    int N;

    scanf("%d", &N);

    

    if(N%2==0){

        printf("%d", N/2);

    }

    else{

        printf("%d", N/2+1);

    }

    

   

    

    return 0;

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

using namespace std;

int main()

{

	int n;

	cin>>n;

	cout<<(n+1)/2;

}

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



int main()

{

    int N;

    scanf("%d", &N);

    

    if(N%2==0){

        printf("%d", N/2);

    }

    else{

        printf("%d", N/2+1);

    }

    

   

    

    return 0;

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

using namespace std;

int n;

int saiki(int ima)

{

	if(ima == n)

		return 1;

	if(ima > n)

		return 0;



	int res = 0;

	res += saiki(ima + 1) + saiki(ima + 2) + saiki(ima + 3);

	return res;

}



int main() {

	while (true){

		cin >> n;

		if (n == 0)

			break;

		

		int ans,a;

		ans = saiki(0);

		a = ans;

		ans /= 3650;

		a %= 3650;

		if( a == 0 )

		{

			cout << ans << endl;

		}

		else if( a != 0 )

		{

			ans++;

			cout << ans << endl;

			

		}

	}

}

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

using namespace std;



int main()

{

	int n, cnt, y;

	int c[31];



	c[0] = 1;

	c[1] = 1;

	c[2] = 2;

	for( int i=3; i<=30; i++ )

		c[i] = c[i-1] + c[i-2] + c[i-3];



	while( cin >> n, n != 0 ){

		y = c[n]/(365*10);

		y += !( c[n]%(365*10) == 0 );

		cout << y << endl;

	}



	return 0;

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



using namespace std;



long long int kaidan (int n) {

	if (n == 0) {

		return 1;

	} else {

		if (n >= 3) {

			return kaidan(n-3)+kaidan(n-2)+kaidan(n-1);

		} else if (n > 1) {

			return kaidan(n-2)+kaidan(n-1);

		} else {

			return kaidan(n-1);

		}

	}

}





int main() {

	int n;

	while (cin >> n) {

		if (n == 0) {

			break;

		}

		long long int a = kaidan(n);

		long long int b;

		b = a / 10;

		if (a % 10 != 0) {

			b++;

		}

		a = b / 365;

		if (b % 365 != 0) {

			a++;

		}

		cout << a << endl;

	}

	return 0;

}

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

#include <cmath>

#include <vector>



using namespace std;



int main() {

	int n;

	while (cin >> n) {

		if (n == 0) {

			break;

		}

		vector<int> dp(31, 0);

		dp[0] = 1;

		dp[1] = 1;

		dp[2] = 2;

		for (int j = 3; j <= n; j++) {

			dp[j] = dp[j-1]+dp[j-2]+dp[j-3];

		}

		int y = dp[n]/3650;

		if (dp[n] % 3650 > 0) {

			y++;

		}

		cout << y << endl;

	}

	return 0;

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

using namespace std;



class Answer

{

public:

	Answer(){day = 10; year = 365;}

	

	int N;	//??\???

	int day;

	int year;

	unsigned long long count(int cnt);	//??¨??¢?´¢(???)

	void set();	//??\???

	void OutPut();	//???????????????

	

	bool empty();	//???????????¶?????????

	bool ans();	//?§£???

};



unsigned long long Answer::count(int cnt)

{

	if( cnt < 0)

		return 0;

	

	else if(cnt == 0)

		return 1;

	

	return count(cnt - 1) + count(cnt - 2) + count(cnt - 3);

}



void Answer::OutPut()

{

	if( N == 0 )

		return;

	int ans_ = 1;	//??????????????´???

	ans_ += (count( N )) / (day * year);	//??\???

	

	cout << ans_ << endl;;

}



void Answer::set()

{

	cin >> N;

}



bool Answer::empty()

{

	if( N == 0 )return false;

	else return true;

}



bool Answer::ans()

{

	set();

	OutPut();

	return empty();

}



int main()

{

	Answer ans;



	while( ans.ans() );

	return 0;

}

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

using namespace std;



#define MEMO_MAX 100

typedef unsigned long long ULL;



bool Flag_memo_g = true;	//?????¢??????????????????



class Answer

{

public:

	Answer()

	{

		day = 10; year = 365;

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

		{

			memo[i] = 0;

			Flag_memo[i] = false;

		}

	}

	

	int N;	//??\???

	int day;

	int year;



	ULL memo[MEMO_MAX];

	bool Flag_memo[MEMO_MAX];

	

	ULL count(int cnt);	//??¨??¢?´¢(??±???)

	ULL count_memo(int cnt);	//??¨??¢?´¢(??±???)(?????¢???ver.)

	void set();	//??\???

	void OutPut();	//???????????????

	

	bool empty();	//???????????¶?????????

	bool ans();	//?§£???

};



ULL Answer::count(int cnt)

{

	if( cnt < 0 )

		return 0;

	

	else if( cnt == 0 )

		return 1;

	

	return count(cnt - 1) + count(cnt - 2) + count(cnt - 3);

}





ULL Answer::count_memo(int cnt)

{

	if( cnt < 0 )return 0;

	else if( cnt == 0 )return 1;

	

	if( !(Flag_memo[cnt]) )

	{

		memo[cnt] = count_memo(cnt - 1) + count_memo(cnt - 2) + count_memo(cnt - 3);

		Flag_memo[cnt] = true;

	}

	

	return memo[cnt];

}



void Answer::OutPut()

{

	if( N == 0 )

		return;

	int ans_ = 1;	//??????????????´???

	if( Flag_memo_g )

		ans_ += count_memo( N ) / (day * year);

	

	else if( !Flag_memo_g )

		ans_ += (count( N )) / (day * year);	//??\???

	

	cout << ans_ << endl;

}



void Answer::set()

{

	cin >> N;

}



bool Answer::empty()

{

	if( N == 0 )return false;

	else return true;

}



bool Answer::ans()

{

	set();

	OutPut();

	return empty();

}



int main()

{

	Answer ans;



	while( ans.ans() );

	return 0;

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

#include <string>

#include <algorithm>

#include <stack>

#include <queue>

using namespace std;



int func(int kaidan,int now){

	int a=0,b=0,c=0;

	

	if(now==kaidan){

		return 1;

	}else if(now>kaidan){

		return 0;

		}else{

		a+=func(kaidan,now+1);

		b+=func(kaidan,now+2);	

		c+=func(kaidan,now+3);

		}

	

	return a+b+c;

	

}



int main(){

	int n,ans;



	while(cin>>n){

		if(n==0)break;

		ans=func(n,0);

		cout<<ans/10/365+1<<endl;

		

		

		

	}

	

	

	return 0;

}

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

using namespace std;



int memo[31];



int main(){

	int n,ans;

	

	memo[0]=1;

	memo[1]=1;

	memo[2]=2;

	

	for(int i=3;i<31;i++){

		memo[i]=memo[i-1]+memo[i-2]+memo[i-3];

	}

	

	while(cin>>n){

		if(n==0)break;

		cout<<memo[n]/(365*10)+1<<endl;

	}

	

	return 0;

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



int n;

int cmb;

int dp[30];



int func(int now){

  if(now > n)

    return 0;

  if(now == n){

    dp[now] = 1;

    return 1;

  }





  return func(now+1) + func(now+2) + func(now+3);

}



int main(void){

  while(1){

    int ans;

    std::cin >> n;



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

      dp[i] = -1;

    }



    if(n == 0){

      return 0;

    }



    cmb = 0;

    ans = func(0);



    std::cout << ans / 10 / 365 + 1 << std::endl;

  }

}

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



int n;

int cmb;

int dp[31];



/*

int func(int now){

  if(now > n)

    return 0;

  if(now == n){

    dp[now] = 1;

    return 1;

  }





  return func(now+1) + func(now+2) + func(now+3);

}

*/



int func(int now){

  int a[3];

  if(now < 0){

    return 0;

  }

  if(now == 0){

    return 0;

  }

  if(now == 1){

    return 1;

  }

  if(now == 2){

    return 2;

  }

  if(now == 3){

    return 4;

  }



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

    if(dp[now-i] != -1){

      a[i-1] = dp[now-i];

    }else{

      a[i-1] = func(now-i);

      dp[now-i] = a[i-1];

    }

  }



  return a[0] + a[1] + a[2];



}



int main(void){

  while(1){

    int ans;

    std::cin >> n;



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

      dp[i] = -1;

    }



    if(n == 0){

      return 0;

    }



    cmb = 0;

    ans = func(n);



    std::cout << ans / 10 / 365 + 1 << std::endl;

  }

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

using namespace std;

int a[200005];

int main(int argc, char** argv) {

	int n,m;

	cin >> n >> m;

	if(m==1||m==2*n-1)

	{

		puts("No");

		return 0;

	}

	puts("Yes");

	a[n]=m;

	a[n-1]=m-1;

	a[n+1]=m+1;

	int now=0;

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

	{

		if(i==n||i==n-1||i==n+1)

			continue;

		++now;

		if(now==m-1)

			now=m+2;

		a[i]=now;

	}

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

		cout << a[i] << endl;

	return 0;

}

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

#include <cstdio>

using namespace std;



int main() {

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

	if(x == 1 || x == 2 * n - 1) return puts("No"), 0;

	puts("Yes"); int t = 1;

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

		while(abs(t - x) <= 1) t ++;

		printf("%d\n", t ++);

	}

	printf("%d\n%d\n%d\n", x - 1, x, x + 1);

	for(int i = n + 2; i < 2 * n; i ++) {

		while(abs(t - x) <= 1) t ++;

		printf("%d\n", t ++);

	}

	return 0;

}