#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, i, j;
  cin >> k;
  i = k / 2;
  j = k % 2;
  if (k > 36)
    cout << -1;
  else {
    for (k = 0; k < i; k++) cout << 8;
    for (k = 0; k < j; k++) cout << 4;
  }
  return 0;
}
