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