#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n % 2 == 0) {
    for (int i = n; i >= 1; i -= 2) cout << "1";
  } else {
    string s = "7";
    s.append((n - 3) / 2, '1');
    cout << s;
  }
}
