#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  if (n % 2 == 0) {
    long long int tmp = n / 2;
    for (int i = 0; i < (tmp); i++) cout << "1";
    cout << endl;
  } else {
    cout << "7";
    n -= 3;
    long long int tmp = n / 2;
    for (int i = 0; i < (tmp); i++) cout << "1";
    cout << endl;
  }
}
int main() {
  solve();
  return 0;
}
