#include <stdio.h>
#include <math.h>

int main() {
    int n;
    int x,y;
    unsigned long result=0, i=0;

	scanf("%d",&n);

        x = n/2;
        y = x-1;

    if ( n%2 == 0 ){
        while (i <= y){
        	result = result + pow(10,i);
        	i++;
        }
    }
    else {
    	if ( y == 0){
    		result = 7;
    	}
    	else{
       		while (i <= y-1){
        		result = result + pow(10,i);
        		i++;
       		}
    		result = result + 7*pow(10,y);
    	}
    }

    printf("%d\n",result);
    
    return 0;
}