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