#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << "{" << p.first << "," << p.second << "}";
  return os;
}
const int N = 3e5 + 5;
const int oo = 1e9 + 7;
bool g[101][101];
void add(int u, int v) { g[u][v] = g[v][u] = 1; }
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int k;
  cin >> k;
  for (int i = 3; i <= 100; i++) {
    if (k == 0) break;
    k--;
    add(i, 1);
    add(i, 2);
    add(1, 2);
    int now = 2;
    for (int j = 3; j < i; j++) {
      if (now <= k) {
        k -= now;
        add(i, j);
        now++;
      }
    }
  }
  assert(k == 0);
  cout << "100\n";
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= 100; j++) cout << g[i][j];
    cout << "\n";
  }
}
