#include #include using namespace std; int main(void){ int n; int dig; int match; stack stc; cin>>n; dig=1; match=0; while(n>0){ if(n%2==1&&n-3>=0){ n=n-3; stc.push(7); }else if(n-2>=0){ n=n-2; stc.push(1); }else{ break; } } while(!stc.empty()){ match+=stc.top()*dig; stc.pop(); dig=dig*10; } cout << match << '\n'; return 0; }