#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main()
{
    int num_of_people;       //人数
    int total_money;         //总需要付款
    int each_afford[500001]; //每个人余款
    cin >> num_of_people;
    cin >> total_money;
    for (int i = 0; i < num_of_people; i++)
    {
        cin >> each_afford[i];
    }
    sort(each_afford, each_afford + num_of_people); //将每个人余款升序排序
    double avg = total_money * 1.0 / num_of_people; //计算初始平摊要给的钱
    double newavg = avg;                            //新的平均值
    double ans = 0;                                 //方差

    for (int i = 0; i < num_of_people; i++)
    {
        if (each_afford[i] < newavg) //有的人连AA都给不起，让他们把现有的钱全给了
        {
            ans = ans + pow((each_afford[i] - avg), 2);           //此时的方差
            total_money = total_money - each_afford[i];           //减掉给不起平摊的人的所有余款
            newavg = total_money * 1.0 / (num_of_people - i - 1); //减掉给不起平摊的钱之后算的平均值
        }
        else
        {
            ans += (num_of_people - i) * pow(newavg - avg, 2);
            break;
        }
    }

    ans = sqrt(ans / num_of_people);
    printf("%.4lf\n", ans);
    return 0;
}