#include <iostream>
using namespace std;

int getOrder(int _input){
    int order = _input/2;
    return order;
}

int main() {
    // your code goes here
    
    int a;
    int order;
    
    
//    cin >> a;
//    
//    if (a > 3){
//        one = a/2;
//        
//        for(int i = 0; i < one; i++ ){
//            cout << "1";
//        }
//        
//    }else if (a == 3){
//        /* code */
//        cout << "7";
//    }else if(a == 1){
//        cout << "1";
//    }
//    
//    cout << endl;
    
    cin >> a;
//    桁がいくつ作れるか
//    余ったマッチ数で作れる最大の数字は?
//    並び替える
//    出力
    order = getOrder(a);
    
    if (a % 2 == 1) {
        cout << "7";
    }else{
        cout << "1";
    }
    
    for (int i = 0; i < order - 1; i++ ) {
        cout << "1";
    }
    cout << endl;
    
    
    return 0;
}