#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n,m;
  vector<int> l;
  cin >> n;
  while(2 <= n){
    if(n==3){
      n-=3;
      cout << "7";
    } else {
      n-=2;
      l.push_back(1);
    }
  }
  for(auto itr=l.begin(); itr!=l.end(); itr++){
  cout << *itr;
  }
  cout << endl;
}