#include <bits/stdc++.h>
using namespace std;
int k;
long long mas[101];
int a[101][101];
int main() {
  ios::sync_with_stdio(0);
  while (cin >> k) {
    mas[3] = 1;
    for (int i = 4; i <= 100; ++i) mas[i] = (i - 1) * (i - 2) / 2 + mas[i - 1];
    int n = 100;
    for (int i = 1; i < n && k > 0; ++i)
      for (int j = 0; j < i && k > 0; ++j) {
        if (k >= (j + 1) * j / 2 - j * (j - 1) / 2)
          k -= (j + 1) * j / 2 - j * (j - 1) / 2;
        else
          continue;
        a[i][j] = 1;
        a[j][i] = 1;
      }
    cout << n << endl;
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < n; ++j) cout << a[i][j];
      cout << endl;
    }
  }
}
