#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  if (k > 36) {
    cout << -1 << endl;
  } else {
    long long num = 0;
    if (k & 1) {
      num = 4;
      k--;
    }
    while (k > 0) {
      num = num * 10 + (8);
      k -= 2;
    }
    cout << num << endl;
  }
}
