#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  if (n > 36) {
    cout << -1 << endl;
  } else {
    if (n % 2 == 0) {
      for (int i = n; i > 1; i -= 2) {
        cout << 8;
      }
      cout << endl;
    } else {
      for (int i = n - 1; i > 1; i -= 2) {
        cout << 8;
      }
      cout << 6 << endl;
    }
  }
  return 0;
}
