#include<cstdio>
#include<algorithm>
#define rep(i,a) for(int i=0;i<(a);++i)

int N;

int main()
{
	scanf( "%d", &N );
	
	if( N&1 )
		putchar('7'), N-=3;

	rep( i, N>>1 )
		putchar('1');

	puts("");

	return 0;
}