print((function (f, s) return string.format("%.2f", f(s)) end)(function (s) local t,a = 0,{} for e in s:gmatch("%d+") do table.insert(a,tonumber(e)) end table.sort(a) for i=2,5 do t=t+a[i] end return t/4 end, io.stdin:read("*l")))