print("{0:.2f}".format(sum(sorted(map(int,input().split()))[1:-1])/4))