#include <bits/stdc++.h>
using namespace std;
const int size = 100;
bool g[110][110];
int n;
int main() {
  for (int i = 0; i <= size + 1; i++)
    for (int j = 0; j <= size + 1; j++) g[i][j] = false;
  cin >> n;
  for (int i = 0; i < size; i++) {
    for (int j = 0; j < i; j++) {
      int ret = 0;
      for (int k = 0; k < size; k++)
        if (g[j][k] && g[i][k]) ret++;
      if (ret <= n) {
        g[i][j] = true;
        g[j][i] = true;
        n -= ret;
      }
    }
  }
  cout << size << endl;
  for (int i = 0; i < size; i++) {
    for (int j = 0; j < size; j++) cout << g[i][j];
    cout << endl;
  }
  return 0;
}
