#include<stdio.h>

#define ll long long

int main(void) {
  int N;
  scanf("%d", &N);

  ll a, ans=1;
  int of = 0;
  for(int i=0; i<N; i++){
    ans *= a;
    if(ans > 1e18) of=1;
  }
  if (of && ans != 0) {
    printf("-1\n");
  } else {
    printf("%lld\n", ans);
  }
}