#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define ld long double
const ld pi=3.1415926535897932384626433;


int main()
{
	int n;
	cin >> n;
	if(n==1)
	{
		cout << '1' << endl;
		cout << '0' << endl;
	}
	else if(n==2)
	{
		cout << '2' << endl;
		cout << '0' << endl;
		cout << "11" << endl;
	}
	else
	{
		cout << n-1 << endl;
		rep(i, n-1)
		{
			cout << '0';
			rep(j, i) cout << '1';
			cout << '0';
			cout << endl;
		}
	}
	return 0;
}
