#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
void solve() {
  long long k;
  cin >> k;
  if (k <= 36) {
    if (k == 1) {
      cout << 4 << "\n";
    } else if (k == 2) {
      cout << 8 << "\n";
    } else if (k % 2 == 0) {
      long long r = k / 2;
      for (long long i = 1; i <= r; i++) {
        cout << '8';
      }
      cout << "\n";
    } else {
      for (long long i = 1; i <= k / 2; i++) {
        cout << '8';
      }
      cout << 6 << "\n";
    }
  } else {
    cout << -1 << "\n";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  solve();
}
