#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int mat[N][N];
int main() {
  int c;
  scanf("%d", &c);
  printf("%d\n", 100);
  for (int i = 0; i < 100; i++) {
    for (int j = 0; j < i; j++) {
      int cnt = 0;
      for (int k = 0; k < 100; k++) cnt += mat[i][k] && mat[j][k];
      if (cnt <= c) {
        c -= cnt;
        mat[i][j] = mat[j][i] = 1;
      }
    }
  }
  for (int i = 0; i < 100; i++) {
    for (int j = 0; j < 100; j++) printf("%d", mat[i][j]);
    putchar('\n');
  }
}
