#define _CRT_SECURE_NO_WARNINGS #include int main(void) { double s[6], sum = 0, max = 0, min = 100; int or , sr; for (int i = 0; i < 6; i++) scanf("%lf", &s[i]); for (int j = 0; j < 6; j++) { if (max <= s[j]) { max = s[j]; or = j; } if (min >= s[j]) { min = s[j]; sr = j; } } if (or == sr) printf("%.2lf\n", max); else { s[or ] = -1; s[sr] = -1; for (int k = 0; k < 6; k++) { if (s[k] >= 0) sum += s[k]; } printf("%.2lf\n", sum / 4.0); } return 0; }