#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  if (n == 1) {
    cout << 4 << endl;
    return 0;
  }
  if (n > 36) {
    cout << -1;
  } else {
    for (int i = 1; i <= n / 2; i++) cout << 8;
    int x = n % 2;
    if (x) cout << 0;
  }
}
