#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long k = 0;
  cin >> k;
  if (k == 1) {
    cout << "4";
    return 0;
  }
  string s = "";
  unsigned long long a = 1000000000000000000;
  unsigned long long num = 0;
  long long f = 0;
  while (k > 0) {
    if (k >= 2) {
      k -= 2;
      s += to_string(8);
      num = (num * 10) + 8;
    } else {
      k -= 1;
      s += to_string(0);
      num = (num * 10) + 0;
    }
    if (num > a) {
      f = 1;
      break;
    }
  }
  if (f == 0)
    cout << s;
  else
    cout << "-1";
  return 0;
}
