m@main=getLine>>=print.round.foldl1(/).map(log.read).words>>m