l = map(int, raw_input().split()) p = sum(l) - max(l) - min(l) print p / 4.0