#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cstdlib>
#include<queue>
#include<set>
#include<cstdio>
#include<map>
#include<cassert>

using namespace std;

#define ll long long
#define reps(i, a, b) for(int i = a; i < b; i++)
#define rreps(i, a, b) for(int i = a-1; i >= b; i--)
#define rep(i, n) reps(i, 0, n)
#define rrep(i, n) rreps(i, n, 0)
#define P pair<ll, ll>
#define vec vector<int>
#define mat vector<vec>

const ll mod = 1000000007;
const int INF = 1001001001;

int main(){
    ll n;
    cin >> n;
    vector<ll> fb;
    fb.push_back(0);
    fb.push_back(1);
    while(fb.back() < n){
        fb.push_back(fb[fb.size()-1] + fb[fb.size()-2]);
    }
    // cout << fb.size() << endl;
    // rep(i, fb.size()){
    //     cout << fb[i] << " ";
    // }cout << endl;
    vector<P> f;
    int t = 0;
    if(n != 1){
        t = upper_bound(fb.begin(), fb.end(), n)-fb.begin();
        n -= fb[t-1];
        f.push_back(P(fb[t-1], 0));
    }

    while(n > 1){
        int idx = upper_bound(fb.begin(), fb.end(), n)-fb.begin();
        idx--;
        ll num = fb[idx];
        n -= num;
        f.push_back(P(num, t-idx-1));
    }
    vec ans;
    int now = 0;
    // x, y, x, y...
    if(t % 2 == 1){
        rep(i, t-2){
            while(now < f.size() && f[now].second == i){
                if(i % 2 == 1){
                    ans.push_back(1);
                }else{
                    ans.push_back(2);
                }
                now++;
            }
            if(i % 2 == 0){
                ans.push_back(3);
            }else{
                ans.push_back(4);
            }
        }
    }else{
        rep(i, t-2){
            while(now < f.size() && f[now].second == i){
                if(i % 2 == 1){
                    ans.push_back(2);
                }else{
                    ans.push_back(1);
                }
                now++;
            }
            if(i % 2 == 0){
                ans.push_back(4);
            }else{
                ans.push_back(3);
            }
        }
    }
    if(n == 1) ans.push_back(1);

    // cout << "t = " << t << endl;
    // cout << f.size() << endl;
    // rep(i, f.size()){
    //     cout << f[i].first << ":" << f[i].second << " ";
    // }cout << endl;

    // ll x = 0, y = 0;
    // rep(i, ans.size()){
    //     if(ans[i] == 1){
    //         x++;
    //     }else if(ans[i] == 2){
    //         y++;
    //     }else if(ans[i] == 3){
    //         x += y;
        
    //     }else{
    //         y += x;
    //     }
    //     // cout << x << " " << y << endl;
    // }
    // cout << x << " " << y << endl;


    cout << ans.size() << endl;
    rep(i, ans.size()){
        cout << ans[i] << endl;
    }


}
#include<bits/stdc++.h>
using namespace std;
int n;
double f[200001]; 
int main()
{
	cin>>n;
	for(int i=n-1;i>=1;i--)
	{
		f[i]=1.0*((n-i)*(f[i+1]+1)+i)/(n-i);
	}
	printf("%.6lf",f[1]);
	return 0;
}