#include <bits/stdc++.h>
using namespace std;
vector<long long int> vect;
long long int a[100], b[100];
int main() {
  long long int i, j, k, l, m, n;
  cin >> l;
  if (l > 36)
    cout << "-1";
  else {
    if (l == 1)
      cout << "6";
    else {
      for (i = 1; i <= l - 1; i += 2) cout << "8";
      if (l % 2 != 0) cout << "6";
    }
  }
}
