#include <bits/stdc++.h>
using namespace std;
bool cmpf(float a, float b, float epsilon) {
  return (fabs(a - b) <= epsilon * max(fabs(a), fabs(b)));
}
long long int fpow(long long int n, long long int k, long long int p) {
  long long int r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
long long int inv(long long int a, long long int p) {
  return fpow(a, p - 2, p);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, n, m, k, d, di, ti, si, cnt, temp, i, j, l, r, x;
  cin >> n;
  if (n > 36)
    cout << "-1" << endl;
  else if (n == 1)
    cout << "4" << endl;
  else {
    string s;
    while (1) {
      s.push_back('8');
      n = n - 2;
      if (n == 1 || n == 0 || s.size() >= 19) break;
    }
    if (n == 1) s.push_back('4');
    cout << s;
  }
  return 0;
}
