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