#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
using namespace std;
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end()
#define rall(c) (c).rbegin(),(c).rend()
#define mp make_pair
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef long double ld;
const ll inf=1e9+7;
const ll mod=1e9+7;
int main(){
    ll n;cin>>n;
    if(n==2){
        cout<<2<<endl;
        cout<<0<<endl;
        cout<<11<<endl;
    }
    else if(n==1){
        cout<<1<<endl;
        cout<<0<<endl;
    }
    else{
        cout<<n-1<<endl;
        rep(i,n-1){
            cout<<0;
            rep(j,i){
                cout<<1;
            }
            cout<<0<<endl;
        }
    }
}
