#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  if (n == 2)
    cout << 1;
  else {
    if (n == 3)
      cout << 7;
    else {
      if (n == 4)
        cout << 11;
      else {
        if (n == 5)
          cout << 71;
        else {
          if (n == 6)
            cout << 111;
          else {
            if (n == 7)
              cout << 711;
            else {
              long long int x = n / 2;
              if (n % 2 == 0) {
                while (x--) cout << 1;
              } else {
                cout << 7;
                x--;
                while (x--) cout << 1;
              }
            }
          }
        }
      }
    }
  }
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) solve();
  cerr << '\n'
       << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms\n";
}
