#include <bits/stdc++.h>
const double eps = 0.0000001;
using namespace std;
inline int sgn(double x) { return (x > eps) - (x < -eps); }
static char buf[100000], *pa = buf, *pd = buf;
inline long long read() {
  register long long x(0), f(1);
  register char c(
      pa == pd && (pd = (pa = buf) + fread(buf, 1, 100000, stdin), pa == pd)
          ? EOF
          : *pa++);
  while (c > '9' || c < '0')
    f = c == '-' ? -1 : 1,
    c = pa == pd && (pd = (pa = buf) + fread(buf, 1, 100000, stdin), pa == pd)
            ? EOF
            : *pa++;
  while (c >= '0' && c <= '9')
    x = x * 10 + c - 48,
    c = pa == pd && (pd = (pa = buf) + fread(buf, 1, 100000, stdin), pa == pd)
            ? EOF
            : *pa++;
  return f * x;
}
long long c[104][104];
long long ans[104][104];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (int i = 1; i <= 100; ++i) {
    ans[1][i] = ans[i][1] = 1;
  }
  ans[1][1] = 0;
  int k = 1;
  for (int i = 2; i <= 99; ++i) {
    for (int j = i + 1; j <= 100; ++j) {
      if (ans[i][j]) continue;
      ans[i][j] = ans[j][i] = 1;
      n -= (i - 1);
      if (n == 0) break;
      for (int k = i + 1; k < j; ++k) {
        if (ans[k][j]) continue;
        if (n - (k - 1) < 0) break;
        ans[k][j] = ans[j][k] = 1;
        n -= (k - 1);
        if (n == 0) break;
      }
      if (n == 0) break;
    }
    if (n == 0) break;
  }
  cout << 100 << endl;
  for (int i = 1; i <= 100; ++i) {
    for (int j = 1; j <= 100; ++j) cout << ans[i][j];
    cout << endl;
  }
}
