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