import java.util.Scanner; public class b { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int max = -1; int min = -1; double sum = 0; for(int i = 0; i < 6; i++){ int foo = sc.nextInt(); if(max == -1 || foo > max) max = foo; if(min == -1 || foo < min) min = foo; sum += foo; } System.out.printf("%.2f\n", (sum - max - min) / 4); } }