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