#include <bits/stdc++.h>
using namespace std;
string ans[100];
long long int C(long long int n, long long int m) {
  long long int res = 1;
  for (long long int i = 0; i < ((long long int)(m)); ++i) res *= n - i;
  for (long long int i = 0; i < ((long long int)(m)); ++i) res /= i + 1;
  return res;
}
long long int run(long long int n) {
  for (long long int i = 0; i < ((long long int)(100)); ++i)
    ans[i] = string(100, '0');
  long long int T = 2;
  long long int pos;
  while (C(T + 1, 3) <= n) T++;
  for (long long int i = 0; i < ((long long int)(T)); ++i)
    for (long long int j = 0; j < ((long long int)(T)); ++j)
      if (i != j) ans[i][j] = '1';
  n -= C(T, 3);
  for (pos = T; n; pos++) {
    long long int d = 1;
    while (C(d + 1, 2) <= n) d++;
    for (long long int i = 0; i < ((long long int)(d)); ++i) ans[i][pos] = '1';
    for (long long int i = 0; i < ((long long int)(d)); ++i) ans[pos][i] = '1';
    n -= C(d, 2);
  }
  cout << 100 << endl;
  for (long long int i = 0; i < ((long long int)(100)); ++i)
    cout << ans[i] << endl;
  return pos;
}
int main() {
  if (0) {
    for (long long int i = 0; i < ((long long int)(100000)); ++i) {
      if (80 < run(i + 1)) cout << run(i + 1) << endl;
    }
  } else {
    long long int n;
    cin >> n;
    run(n);
  }
}
