import java.util.Scanner;
public class Main {
    
    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        int[] array = new int[7];
        int max = Integer.MIN_VALUE;
        int min = Integer.MAX_VALUE;
        int countMax = 0;
        int countMin = 0;
        // 找最大值和最小值
        for(int i = 0 ; i < array.length ; i++) {
            array[i] = sc.nextInt();
            if(max < array[i]) {
                max = array[i];
            }
            if(min > array[i]) {
                min = array[i];
            }
        }
        // 计算最大值和最小值出现的次数
        for(int i = 0 ; i < array.length ; i++) {
            if(max == array[i]) {
                countMax++;
                array[i] = 0;
            }
            if(min == array[i]) {
                countMin++;
                array[i] = 0;
            }
        }
        
        // 计算平均分
        int sum = 0;
        double avg = 0.0;
        for(int i = 0 ; i < array.length ; i++) {
            sum += array[i];
        }
        avg = sum*1.0 / (array.length - countMax - countMin);
        System.out.println(String.format("%.2f", avg));
    }
}