use bigint;print/(.)0+$/?$1:-1for<>*1e999/<>