#include using namespace std; int main(){ int N; cin >> N; string S = ""; if(N % 2 == 0){ while(true){ if(N >= 1){ S += "1"; N /= 2; } if(N / 2 <= 0) break; } }else{ S += "7"; N /= 2; while(true){ if(N >= 1){ S += "1"; N /= 2; } if(N / 2 <= 0) break; } } cout << S << endl; return 0; }