S = list(map(int, input().split(' ')))
print("{0:0.2f}".format((sum(S)-max(S)-min(S)) / 4))