for a in ${input_num[@]}
do
        if [ $a -eq 0 ] ; then
                echo 0
                exit
        fi
done

result=1

for a in ${input_num[@]}
do
        result=`echo $result \* $a | bc`

        if((max/result<a)); then
                result=-1
                break
        fi
done

echo $result
