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