#include <bits/stdc++.h>
using namespace std;
int n;
int v[] = {6, 2, 5, 5, 4, 5, 6, 3, 7, 6};
string s;
int main() {
  scanf("%d", &n);
  while (n > 3) {
    n -= 2;
    s += "1";
  }
  if (n == 2) s += "1";
  if (n == 3) s += "7";
  sort(s.rbegin(), s.rend());
  cout << s;
}
