#include <iostream>
using namespace std;

int main(void){
  int n;
  cin >> n;
  string s;
  while(n > 0){
    s += (n%2) ? '7' : '1';
    n -= n % 2 ?  3 : 2;
  }
  cout << s << endl;
}