#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize(2)
bool e[105][105];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int k;
  cin >> k;
  e[1][2] = e[2][1] = 1;
  for (int i = 3; i <= 100; i++) {
    e[1][i] = e[i][1] = 1;
    for (int j = 2; j < i; j++) {
      if (k < j - 1) break;
      k -= j - 1;
      e[i][j] = e[j][i] = 1;
    }
    if (!k) break;
  }
  cout << 100 << '\n';
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= 100; j++) cout << e[i][j];
    cout << '\n';
  }
  return 0;
}
