# Ruby - 74 characters a=0 ("+ "+ARGF.read).split.each_slice(2){|b|a=a.send(b[0],b[1].to_f)} p a