#include <bits/stdc++.h>
using namespace std;
int n, x;
long long g = 0;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  x = n / 2;
  n %= 2;
  if (x + n > 18)
    cout << -1;
  else {
    for (int i = 0; i < x; ++i) cout << 8;
    for (int i = 0; i < n; ++i) cout << 9;
  }
  return 0;
}
