#include <bits/stdc++.h>
using namespace std;
long long ans, k;
long long g[14] = {1, 0, 0, 0, 1, 0, 1, 0, 2, 1};
int main() {
  ans = 0;
  scanf("%I64d", &k);
  if (k > 18 * 2) return puts("-1"), 0;
  if (k == 1) return puts("4"), 0;
  int ge = k / 2, te = k % 2;
  for (int i = 1; i <= ge; i++) cout << "8";
  if (te) cout << "0";
  cout << endl;
  return 0;
}
