#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  if (a > 36) {
    cout << "-1";
  } else {
    while (a >= 2) {
      a -= 2;
      cout << "8";
    }
    if (a == 1) {
      cout << "4";
    }
  }
}
