#include <stdio.h>
#include <stdarg.h>
float multiMin(int num, ...) {
va_list lista;
float min
= va_arg(lista
, double);
for (int i = 1; i < num; i++) {
float item
= va_arg(lista
, double); if (item < min)
min = item;
}
return min;
}
int main(void) {
float a, b, c, d, res;
scanf("%f\n%f\n%f\n%f\n", &a
, &b
, &c
, &d
); res = (a + b + c + d - multiMin(4, a, b, c, d)) / 3;
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRhcmcuaD4KCmZsb2F0IG11bHRpTWluKGludCBudW0sIC4uLikgewogICAgdmFfbGlzdCBsaXN0YTsKICAgIHZhX3N0YXJ0KGxpc3RhLCBudW0pOwogICAgZmxvYXQgbWluID0gdmFfYXJnKGxpc3RhLCBkb3VibGUpOwoKICAgIGZvciAoaW50IGkgPSAxOyBpIDwgbnVtOyBpKyspIHsKICAgICAgICBmbG9hdCBpdGVtID0gdmFfYXJnKGxpc3RhLCBkb3VibGUpOwogICAgICAgIGlmIChpdGVtIDwgbWluKQogICAgICAgICAgICBtaW4gPSBpdGVtOwogICAgfQogICAgdmFfZW5kKGxpc3RhKTsKICAgIHJldHVybiBtaW47Cn0KCmludCBtYWluKHZvaWQpIHsKICAgIGZsb2F0IGEsIGIsIGMsIGQsIHJlczsKCiAgICBzY2FuZigiJWZcbiVmXG4lZlxuJWZcbiIsICZhLCAmYiwgJmMsICZkKTsKICAgIHJlcyA9IChhICsgYiArIGMgKyBkIC0gbXVsdGlNaW4oNCwgYSwgYiwgYywgZCkpIC8gMzsKICAgIHByaW50ZigiJWYiLCByZXMpOwogICAgcmV0dXJuIDA7Cn0=