#include <bits/stdc++.h>
#define lli long long int
using namespace std;
/*
Ways are something like this :
for number 10 :
|--------O-2-O = 8
| \
| O-O-O-O-2-O = 4
| \
|--------O-O-O-O-O-O-O-2-O = 2
| \
| O-O-O-O-O-O-O-O-O-O- {Node 2} = 1
{Node 1}
*/
bool ans[1005][1005];
int firstID[35];
int lastID[35];
void createWays()
{
int startID[35];
int id = 3;
for (int i=0,k=31 ; i<=31 ; i++,k--) // create bottom to up
{
firstID[i] = id; // set an id for first element in this row
for (int j=0 ; j<k ; j++) // create simple roads
{
ans[id][id+1] = ans[id+1][id+2] = 1;
id+=2;
}
startID[i] = id; // start of 2 way road
if (i!=0) // create 2 way road
{
ans[id][id+1] = ans[id][id+2] = 1;
ans[id+1][id+3] = ans[id+2][id+3] = 1;
id+=3;
}
lastID[i] = id; // last of this row
if (i == 0)
{
ans[ lastID[i] ][ 2 ] = 1;
}
else
{
ans[ lastID[i] ][ startID[i-1] ] = 1;
}
id++;
cout<<id<<"\n";
}
for (int i=1 ; i<=1000 ; i++) // make symmetric
for (int j=1 ; j<=1000 ; j++)
ans[i][j] = ans[i][j] | ans[j][i];
}
int main()
{
createWays();
int k;
cin>>k;
int i=0;
while (i<32)
{
if ( (1<<i) & k ) // connect
{
ans[1][ firstID[i] ] = 1;
ans[ firstID[i] ][1] = 1;
}
i++;
}
for (int i=1 ; i<=1000 ; i++)
{
for (int j=1 ; j<=1000 ; j++)
{
}
}
return 0;
}