#include<bits/stdc++.h>
using namespace std;

int main(){
    string S; cin >> S;
    int ans = 0;
    for(int i=0; i<=9999; i++){
        vector<bool> flag(10);
        int X = i;
        for(int j=0; j<4; j++){
            flag[X%10] = true;
            X /= 10;
        }
        bool flag2 = true;
        for(int j=0; j<10; j++){
            if(S[j]=='o' && !flag[j]) flag2 = false;
            if(S[j]=='x' && flag[j]) flag2 = false;
        }
        ans += flag2;
    }
    cout << ans << endl;
}

#include <bits/stdc++.h>

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,n) for (int i = 0; i < n; i++)
#define forr(i,a,b) for (int i = a; i <= b; i++)
#define all(v) v.begin(), v.end()
#define pb push_back

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;

const int MX = 87;
ll n, f[MX];
vi v;

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);

	f[0] = f[1] = 1;
	for (int i = 2; i < MX; i++)
		f[i] = f[i - 1] + f[i - 2];
	
	cin >> n;
	
	int cn = 0;
	for (int i = MX - 1; i >= 0; i--) {
		if (f[i] <= n) {
			v.pb(1);
			cn++;
			n -= f[i];
		} else if (cn) {
			v.pb(0);
		}
	}
	
	int f = v.size() & 1;
	v.pop_back();
	
	cout << v.size() + cn << endl;
	for (int x : v) {
		if (x) {
			if (f) cout << 1 << endl;
			else cout << 2 << endl;
		}
		if (f) cout << 4 << endl;
		else cout << 3 << endl;
		f = 1 - f;
	}

	return 0;
}
