func_code_string: #include <bits/stdc++.h>   using namespace std;   void OJ() {}   void solve() {     long long n;     cin >> n;     long long digit = 1000000, a = -1, b = -1;     for (long long i = 0; i < 1e6; ++i) {       if (n >= 4 * i)         if ((n - 4 * i) % 7 == 0) {           if ((n - 4 * i) / 7 + i <= digit)             digit = (n - 4 * i) / 7 + i, a = i, b = (n - 4 * i) / 7;         }     }     if (a == -1) {       cout << -1;       return;     }     for (long long i = 0; i < a; ++i) cout << 4;     for (long long i = 0; i < b; ++i) cout << 7;   }   signed main() {     OJ();     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     solve();   }   