#include <bits/stdc++.h>
using namespace std;
int f(int n) {
  int mul = 1;
  while (n) {
    if (n % 10 != 0) mul *= (n % 10);
    n /= 10;
  }
  return mul;
}
int g(int n) {
  if (n < 10) return n;
  return g(f(n));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  if (n > 36) {
    cout << -1;
    return 0;
  }
  while (n) {
    if (n == 1) {
      cout << 6;
      break;
    } else
      cout << 8;
    n -= 2;
  }
  return 0;
}
