#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  if (N == 1){
    cout << 1 << endl;
    cout << 0 << endl;
  } else if (N == 2){
    cout << 2 << endl;
    cout << 0 << endl;
    cout << 11 << endl;
  } else {
    cout << N - 1 << endl;
    for (int i = 0; i < N - 2; i++){
      cout << 0;
      for (int j = 0; j < i; j++){
        cout << 1;
      }
      cout << 0;
      cout << endl;
    }
    for (int i = 0; i < N; i++){
      cout << 1;
    }
    cout << endl;
  }
}
