#include <bits/stdc++.h>
using namespace std;
bool G[105][105];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < 100; ++i)
    for (int j = 0; j < i && j <= n; ++j) G[i][j] = G[j][i] = 1, n -= j;
  printf("100\n");
  for (int i = 0; i < 100; ++i) {
    for (int j = 0; j < 100; ++j) printf("%d", G[i][j]);
    printf("\n");
  }
}
