#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, w = 0;
  char ch = getchar();
  while (!isdigit(ch)) w |= ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return w ? -x : x;
}
long long ma[400][400];
signed main() {
  long long n = read(), m = 1;
  for (; m * (m - 1) * (m - 2) / 6 <= n; ++m)
    ;
  --m;
  n -= m * (m - 1) * (m - 2) / 6;
  for (long long i = 1; i <= m; ++i)
    for (long long j = 1; j <= m; ++j)
      if (i != j) ma[i][j] = 1;
  for (long long i = 100; i > 1; --i)
    while (i * (i - 1) / 2 <= n) {
      ++m;
      for (long long j = 1; j <= i; ++j) ma[m][j] = ma[j][m] = 1;
      n -= i * (i - 1) / 2;
    }
  puts("100");
  for (long long i = 1; i <= 100; ++i, puts(""))
    for (long long j = 1; j <= 100; ++j) printf("%d", ma[i][j]);
  return 0;
}
