#include <bits/stdc++.h>
using namespace std;
void initialize(bool needFiles) {
  if (needFiles) {
    freopen("TC", "r", stdin);
    freopen("input.txt", "w", stdout);
  }
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  initialize(false);
  int n;
  cin >> n;
  if (n > 36)
    cout << -1;
  else {
    long long a = 0;
    if (n == 0)
      cout << a;
    else if (n == 1)
      cout << 6;
    else {
      while (n > 0) {
        a *= 10;
        n--;
        if (n - 1 >= 0) {
          a += 8;
          n--;
        }
      }
      cout << a;
    }
  }
  return 0;
}
