#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  long long ans = 0;
  if (k % 2 == 1) {
    ans = 4;
    k--;
  }
  while (k > 0 && ans <= 1000000000000000000) {
    ans *= 10;
    ans += 8;
    k -= 2;
  }
  if (ans > 1000000000000000000)
    cout << -1;
  else
    cout << ans;
  return 0;
}
