#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int k, e;
  long long int n = 0;
  cin >> k;
  if (k > 36)
    cout << "-1"
         << "\n";
  else {
    e = k / 2;
    k = k % 2;
    for (int i = 1; i <= e; i++) {
      n += 8;
      n = n * 10;
    }
    if (k == 0)
      n /= 10;
    else
      n += 6;
    cout << n << "\n";
  }
  return 0;
}
