#include <bits/stdc++.h>
using namespace std;
int k;
int main() {
  cin >> k;
  if (k > 36)
    cout << -1;
  else {
    while (k > 0) {
      if (k >= 2) {
        cout << 8;
        k -= 2;
      } else {
        cout << 9;
        k -= 1;
      }
    }
    cout << endl;
  }
  return 0;
}
