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