#include <bits/stdc++.h>
using namespace std;
int n, now, cnt;
bool arr[100 + 1][100 + 1];
int main() {
  ios::sync_with_stdio(0);
  cin >> n;
  cout << "100\n";
  for (int i = 1; i < 100; ++i)
    for (int j = 0; j < i; ++j) {
      cnt = 0;
      for (int k = 0; k < i; ++k) cnt += arr[k][i] && arr[j][k];
      if (now + cnt <= n) now += cnt, arr[i][j] = arr[j][i] = true;
    }
  for (int i = 0; i < 100; ++i) {
    for (int j = 0; j < 100; ++j) cout << arr[i][j];
    cout << endl;
  }
  return 0;
}
