#include <bits/stdc++.h>
/// TONI BO$$ was here
/// #MLC

using namespace std;
long long v[100];
vector <int> supl;
vector <int> op;
int main()
{
    int i, s, k, ct;
    long long n;
    scanf("%lld", &n);
    v[0] = v[1] = 1;
    for(i = 2; i <= 100; i++)
        v[i] = v[i - 1] + v[i - 2];
    for(i = 1; v[i] <= n; i++);
    s = --i;
    if(s % 2 == 1)
        s--;
    n -= v[s];
    vector <int> supl;
    while(n)
    {
        for(i = 1; v[i] <= n; i++);
        i--;
        supl.push_back(s - i);
        n -= v[i];
    }
    /*for(auto it : supl)
        printf("%d\n",it);
    printf("\n");*/
    op.push_back(1);
    k = 1;
    if(supl.size() && supl[0] == 0)
        op.push_back(1);
    else
        k = 0;
    for(i = 1,ct = 4; i <= s; i++,ct = 7 - ct)
    {
        op.push_back(ct);
        if(k < supl.size() && supl[k] == i){
            if(ct == 3)
                op.push_back(1);
            else
                op.push_back(2);
            k++;
        }
    }
    printf("%d\n",op.size());
    for(auto it : op)
        printf("%d\n",it);

    return 0;
}

#include <bits/stdc++.h>

#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define repb(i, n) for (ll i = (n)-1; i >= 0; i--)
#define rep(i, n) repd(i, 0, n)

using namespace std;

using ll = long long;
using ul = unsigned long long;
using ld = long double;
const ul mod = 1000000007;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin.tie(NULL);
    ll x;
    cin >> x;
    ll next = (x / 100 + 1) * 100;
    cout << next - x << endl;
    return 0;
}

