文件目录

#include <iostream>
using namespace std;
int sum = 0, mi = 0, n, m;
int main()
{
    while (cin >> n)
    {
        sum = 0, mi = 0;
        while (n--)
        {
            cin >> m;
            sum += m;
            if (m > mi)
                mi = m;
        }
        if (sum >= 2 * mi)
            printf("%.1lf\n", sum / 2.0);
        else
            printf("%.1lf\n", sum * 1.0 - mi);
    }
    return 0;
}