#include using namespace std; int main(void){ int n; cin>>n; while(n>0){ if(n%2==1&&n-3>=0){ cout<<7; n=n-3; }else if(n-2>=0){ cout<<1; n=n-2; }else{ cout<<0; break; } } cout << '\n'; return 0; }