func_code_string: #include <bits/stdc++.h>   using namespace std;   long long n, so7, so4, kiemtra7;   bool check = true;   int main() {     cin >> n;     if (n % 7 == 0) {       so7 = n / 7;       for (int i = 1; i <= so7; i++) cout <<  7 ;     } else {       int r = n % 4;       if (r == 0) {         kiemtra7 = (n - 4) / 28;         if (kiemtra7 == 0) {           check = false;         } else {           so7 = (((n - 4) / 7) / 4 * 4);           n = n - so7 * 7;           so4 = n / 4;           for (int i = 1; i <= so4; i++) cout <<  4 ;           for (int i = 1; i <= so7; i++) cout <<  7 ;         }         if (check == false) {           so4 = n / 4;           for (int i = 1; i <= so4; i++) cout <<  4 ;         }       }       if (r == 1) {         kiemtra7 = (n - 4) / 7 - 3;         so7 = ((((n - 4) / 7 - 3) / 4) * 4 + 3);         n = n - so7 * 7;         if (kiemtra7 < 0)           cout <<  -1 ;         else {           so4 = n / 4;           for (int i = 1; i <= so4; i++) cout <<  4 ;           for (int i = 1; i <= so7; i++) cout <<  7 ;         }       }       if (r == 2) {         kiemtra7 = (n - 4) / 7 - 2;         so7 = ((((n - 4) / 7 - 2) / 4) * 4 + 2);         n = n - so7 * 7;         if (kiemtra7 < 0)           cout <<  -1 ;         else {           so4 = n / 4;           for (int i = 1; i <= so4; i++) cout <<  4 ;           for (int i = 1; i <= so7; i++) cout <<  7 ;         }       }       if (r == 3) {         kiemtra7 = (n - 4) / 7 - 1;         so7 = ((((n - 4) / 7 - 1) / 4) * 4 + 1);         n = n - so7 * 7;         if (kiemtra7 < 0)           cout <<  -1 ;         else {           so4 = n / 4;           for (int i = 1; i <= so4; i++) cout <<  4 ;           for (int i = 1; i <= so7; i++) cout <<  7 ;         }       }     }   }   