#!/usr/bin/env python S = map(int,raw_input().split()) SL = len(S) max = 0 min =101 for i in range(0,SL): if S[i] > max: max = S[i] if S[i] < min : min = S[i] calc = 0 for i in range(0,SL): if S[i] != max and S[i] != min: calc = calc + S[i] calc2 = float(calc) / (SL - 2) print calc2