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