#include <bits/stdc++.h>
using namespace std;
int a[105][105];
int main() {
  int n = 100, m;
  cin >> m;
  for (register int i = 1; i <= n; ++i)
    for (register int j = 1; j < i; ++j) {
      int cnt = 0;
      for (register int k = 1; k <= n; ++k)
        if (a[i][k] && a[k][j]) ++cnt;
      if (cnt <= m) m -= cnt, a[i][j] = a[j][i] = 1;
    }
  cout << n << endl;
  for (register int i = 1; i <= n; ++i, puts(""))
    for (register int j = 1; j <= n; ++j)
      if (a[i][j])
        putchar('1');
      else
        putchar('0');
  return 0;
}
