function main(input) {
  const numbers = input.split(" ");
  let ans = 1;
  numbers.forEach(i => ans *= Number(i));
  
  if (`${ans}`.length > 18) {
    console.log(-1);
  } else {
  	console.log(ans);
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));