#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair Pr; int N; int main() { cin >> N; int seven = N / 3; int one; if (N % 3 == 0)one = 0; else { one = (N % 3) / 2; if (one == 0) { seven--; one+=2; } } for (int i = 0; i < seven; i++) cout << 7; for (int i = 0; i < one; i++) cout << 1; cout << endl; return 0; }