#include <bits/stdc++.h>
using namespace std;
int adj[101][101];
int main() {
  int k;
  cin >> k;
  int t;
  for (t = 1; (t - 1) * (t - 2) / 2 <= k; ++t) {
    k -= (t - 1) * (t - 2) / 2;
    for (int j = 1; j < t; ++j) adj[t][j] = adj[j][t] = 1;
  }
  t--;
  int i;
  for (i = t + 1; k > 0; ++i) {
    for (int j = 1; k - (j - 1) >= 0 && k > 0; ++j) {
      k -= (j - 1);
      adj[i][j] = adj[j][i] = 1;
    }
  }
  cout << "100\n";
  for (int i = 1; i <= 100; ++i) {
    for (int j = 1; j <= 100; ++j) cout << adj[i][j];
    cout << '\n';
  }
  return 0;
}
