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