#include <bits/stdc++.h>
#define INT long
#define oo 987654321
#define OO 9999999987654321
#define MOD 998244353
using namespace std;
INT n, m, ans, a[20];
void f(int x, int y, int z)
{
    if( z > 2 ) return;
    if( x == n )
    {
        if( y and z < 2 )
        {
            for(int i = 0 ; i < n ; i++ )
            {
                if( a[i] == 1 ) cout<<"1";
                else cout<<"0";
            }
            cout<<endl;
            ans++;
        }
        return;
    }
    a[x] = 1;
    f(x+1, y+1, z+1);
    a[x] = 0;
    f(x+1, y, 0);
}
int main()
{
    freopen(".10.in","r",stdin);
    freopen(".10.out","w",stdout);
    cin>>n;
    f(0, 0, 1);
    cout<<ans<<endl;
}
