$l=length($S=<>)-1;$S=~s/.*/$&$&/; $%=-1e9; $_=substr($S,$_,$l),/^\D|\D$/||(s/\b0+\B//g,(eval)>$%and$%=eval)for 0..$l-1; print$%