m@main=do e<-getLine;putStrLn$f$splitAt 99$v$s$sum[r$a++take 99b|(a,_:b)<-[span('.'<)$t++cycle"0"|t<-"1.":words e]];m f(a,b)=s(r(v b)-1)++'.':v(s$r a) v=reverse r=read s=show
Note that non-ascii characters in the above source code will be escaped (such as \x9f).