#include <bits/stdc++.h>
using namespace std;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
using Int = long long;
const char newl = '\n';

//INSERT ABOVE HERE
signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);

  Int n;
  cin>>n;

  if(n==1){
    cout<<1<<endl<<0<<endl;
    return 0;
  }

  if(n==2){
    cout<<2<<endl<<0<<endl<<11<<endl;
    return 0;
  }

  cout<<n-1<<endl;
  for(Int i=2;i<=n;i++){
    string s(i,'0');
    s.front()=s.back()='1';
    cout<<s<<endl;
  }

  return 0;
}

