#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  if (n == 3) {
    cout << 7;
    return 0;
  }
  vector<int> answer;
  for (int i = 0; i < (n / 2) - 1; i++) {
    answer.push_back(1);
  }
  if (n % 2 == 0)
    answer.push_back(1);
  else
    answer.push_back(7);
  sort(answer.rbegin(), answer.rend());
  for (int i : answer) {
    cout << i;
  }
  return 0;
}
