#include <bits/stdc++.h>
using namespace std;
map<unsigned long long, int> mp;
long long a, b, c, d, m, n, vp, dp, k;
string s;
int main() {
  cin >> n;
  if (n == 1) {
    cout << 6;
    return 0;
  }
  if (n > 36) {
    cout << -1;
    return 0;
  }
  while (n > 0) {
    if (n >= 2) {
      cout << 8;
      n -= 2;
    }
    if (n == 1) {
      cout << 0;
      n -= 1;
    }
  }
}
