#include using namespace std; int main() { int min = 999,max = -1; int a; int sum = 0; for(int i = 0; i < 6; i++) { cin >> a; if(min > a)min = a; if(max < a)max = a; sum += a; } sum -= min + max; cout << sum; }