#include <bits/stdc++.h>
using namespace std;
ofstream fo("test.out");
ifstream fi("test.inp");
int n;
int main() {
  cin >> n;
  if (n > 36)
    cout << -1;
  else {
    while (n) {
      if (n % 2)
        cout << 6, n--;
      else
        cout << 8, n -= 2;
    }
  }
}
