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