#include <stdio.h>
#include <string>
int main(){
    int N;
    scanf("%d",&N);

    std::string s;
    if (N%2 == 0){
        for (int i = 0;i < N/2;i++){
            s += '1';
        }
    }else{
        s += '7';
        for (int i = 0;i < (N-3)/2;i++){
            s += '1';
        }
    }
    printf("%s\n",s.c_str());
}