#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  if (x > 36) {
    cout << -1;
    return 0;
  }
  string s = "";
  int i;
  for (i = x; i > 1; i -= 2) {
    s = s + "8";
  }
  if (i == 1) {
    s = s + "4";
  }
  cout << s;
}
