#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long long MOD = 1000000007;
constexpr long long MOD2 = 998244353;
constexpr long long INF = 1LL << 60;
const long double PI = acosl(-1.0);
constexpr long double EPS = 1e-11;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
void factorization(long long n,map<long long ,long long>& mp){
    for(long long i=2;i*i<=n;i++){
        while(n%i==0){
            mp[i]++;
            n /= i;
        }
     }
     if(!(n == 1)) mp[n]++;
}
void divisor(ll n, map<ll,ll>& ret) {
    for (ll i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ret[i]++;
            if (i * i != n) ret[n / i]++;
        }
    }
}
int main(){
ll n;
cin >> n;
map<ll, ll> mp;
ll ans = 0;
divisor(2 * n, mp);
for(auto i:mp){
    ll x = i.first;
    ll y = 2 * n / i.first;
    if (x < y) swap(x, y);
    if ((x - y - 1) % 2 == 0 and (x + y - 1) % 2 == 0) ans++;
}
cout << ans << endl;
}
#include<bits/stdc++.h>
using namespace std;

long long f[110],n;

int main(){
	scanf("%lld",&n);
	f[0]=1;f[1]=1;
	int t=1;
	while(f[t-1]+f[t]<=n) t++,f[t]=f[t-1]+f[t-2];
	long long tmp=n;
	int ans=t;
	for(int i=t;i>=1;i--) if(tmp>=f[i]) tmp-=f[i],ans++;
	printf("%d\n",ans);
	for(int i=t;i>=1;i--){
		if(n>=f[i]) printf("%d\n",(i&1)+1),n-=f[i];
		printf("%d\n",((i-1)&1)+3);
	}
}