#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
struct Edge {
  ll to;
  ll cost;
};
int main() {
  int N;
  cin >> N;
  deque<int> ans(0);
  while (1 < N) {
    if (4 <= N) {
      ans.push_front(1);
      N -= 2;
      continue;
    }
    if(N==3){
      ans.push_front(7);
      N -= 3;
    }
    if(N==2){
      ans.push_front(1);
      N -= 2;
    }

  }
  while(!ans.empty()){
    int num = ans.front();
    ans.pop_front();
    cout << num;
  }
  cout << endl;
}