print((function (f1, f2, g) local i,f=g() if f==0 then return tostring(i)..".0000000000" end if (f>0 and f>=1e10) or (f<0 and f<=-1e10) then return f1(i,f) end return f2(i,f) end)(function (i, f) local s=tostring(f) return tostring(i+tonumber(s:sub(1,#s-10))).."."..s:sub(#s-9) end, function (i, f) if f>0 and i<0 then i,f = i+1,math.abs(f-1e10) end if f<0 and i>=0 then i,f = i-1,math.abs(f+1e10) end local s=tostring(f) return tostring(i).."."..string.rep("0",10-#s)..s end, function () local i,f=0,0 for _=1,tonumber(io.stdin:read("*l")) do local a,b,c = io.stdin:read("*l"):match("(%-?)(%d+)%.?(%d*)") b,c = tonumber(b),(#c~=0 and tonumber(c..string.rep("0",10-#c)) or 0) if a=="" then i,f=i+b,f+c else i,f=i-b,f-c end end return i,f end))