#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#define FOR(i,n) for(int i=0;i<n;i++)
#define debln(a) cout << #a << " : " << a << endl;
using namespace std;
int n;

vector<string> save;
set<string> s;
bool check(string t) {
     //if(s.find(t) == s.end()) return true;
     //return false;
     FOR(i,t.size())
     if(s.find(t.substr(0,i) + t.substr(i+1,n)) != s.end()) return false;
     return true;
}
int main() {
//    ofstream out;
//    out.open("signals.out");
    cin >> n;
    s.clear();
 //   set<string>::iterator it;
    //for(it = s.begin();it != s.end(); ++it) cout << *it << endl;
    FOR(i,n) {
           string tmp;
           int k = 0;
           for(k=0;k<i;k++) tmp+='0';
           for(;k<n;k++) tmp+='1';
           //debln(tmp);
           string tt;
           FOR(ff,tmp.size()) if(tmp[ff]=='1') tt+='0'; else tt+='1';
           if(check(tt)) {
                    save.push_back(tt);
                    FOR(kk,tt.size())
                    s.insert(tt.substr(0,kk) + tt.substr(kk+1,tt.size()));
           }
           while(next_permutation(tmp.begin(),tmp.end())) {
                      //debln(tmp);
                      //string t=tmp;
                      string t;
                      //debln(t);
                      FOR(f,tmp.size()) if(tmp[f] == '1') t+='0'; else t+='1';
                      if(check(t)) {
                                   save.push_back(t);
                                   FOR(f2,t.size()) {
                                   s.insert(t.substr(0,f2) + t.substr(f2+1,t.size()));
                              //     debln(tmp.substr(0,i)); debln(tmp.substr(i+1,tmp.size()));
                                   }
                      }
           }
       }
    cout << save.size() << endl;
    FOR(i,save.size()) cout << save[i] << endl;

    return 0;
}
