s = list(map(int, input().split())) del s[s.index(max(s))] del s[s.index(min(s))] count = 0 for i in range(4): count = count + s[i] count /= 4 print('%02.2f' % count)