#include using namespace std; int main(){ int n; cin >> n; int one = 0,seven = 0; if(n % 2 == 0) one = n / 2; else{ seven = n / 3; n -= seven * 3; one = n / 2; } for(int i = 0; i < seven; i++) cout << 7; for(int i = 0; i < one; i++) cout << 1; cout << endl; return 0; }