#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll OO = 1e18;
int di[8] = {0, 0, 1, -1, -1, 1, -1, 1};
int dj[8] = {1, -1, 0, 0, 1, 1, -1, -1};
string ys = "YES", no = "NO";
void fast() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
const int N = (1 << 17);
int v[101][101];
int main() {
  fast();
  int n;
  cin >> n;
  for (int i = 1; i < 100; i++) {
    v[0][i] = 1;
    v[i][0] = 1;
    for (int j = 1; j < i; j++) {
      if (n < j) break;
      v[i][j] = 1;
      v[j][i] = 1;
      n -= j;
    }
  }
  cout << 100 << '\n';
  for (int i = 0; i < 100; i++) {
    for (int j = 0; j < 100; j++) cout << v[i][j];
    cout << '\n';
  }
}
