#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k, i;
  cin >> n;
  int m = n % 7;
  k = n / 7;
  switch (m) {
    case 1:
      k--;
      if (k >= 0) cout << "44";
      break;
    case 2:
      k -= 2;
      if (k >= 0) cout << "4444";
      break;
    case 3:
      k -= 3;
      if (k >= 0) cout << "444444";
      break;
    case 4:
      cout << "4";
      break;
    case 5:
      k--;
      if (k >= 0) cout << "444";
      break;
    case 6:
      k -= 2;
      if (k >= 0) cout << "44444";
      break;
  }
  if (k < 0)
    cout << "-1";
  else
    for (i = 0; i < k; i++) cout << "7";
  return 0;
}
