#include <bits/stdc++.h>
using namespace std;
int n, cnt = 1, a[110][110];
int main() {
  cin >> n;
  while (n > 0) {
    for (int i = 0; i <= n; i++) {
      if (i >= cnt) break;
      a[i][cnt] = 1;
      a[cnt][i] = 1;
      n -= i;
    }
    cnt++;
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    for (int j = 0; j < cnt; j++) cout << a[i][j];
    cout << endl;
  }
  return 0;
}
