from math import sqrt

from statistics import mean



def standard_deviate(numbers):

    m = mean(numbers)

    b = sum([(n - m)**2 for n in numbers])

    return sqrt(b/len(numbers))



if __name__ == '__main__':

    while True:

        n = int(eval(input()))

        if n == 0:

            break

        students = list(map(int, input().split()))[0:n]

        print((standard_deviate(students)))



from math import sqrt



def standard_deviate(numbers):

    m = sum(numbers) / len(numbers)

    d = sqrt(sum([(n - m)**2 for n in numbers]) / len(numbers))

    return d



if __name__ == '__main__':

    while eval(input()) != '0':

        students = list(map(int, input().split()))

        print((standard_deviate(students)))



from math import sqrt
from statistics import mean


def standard_deviate(numbers):
    m = mean(numbers)
    b = sum([(n - m) ** 2 for n in numbers])
    return sqrt(b / len(numbers))


if __name__ == "__main__":
    while True:
        n = int(eval(input()))
        if n == 0:
            break
        students = list(map(int, input().split()))[0:n]
        print((standard_deviate(students)))

from math import sqrt


def standard_deviate(numbers):
    m = sum(numbers) / len(numbers)
    d = sqrt(sum([(n - m) ** 2 for n in numbers]) / len(numbers))
    return d


if __name__ == "__main__":
    while eval(input()) != "0":
        students = list(map(int, input().split()))
        print((standard_deviate(students)))

-from statistics import mean -    m = mean(numbers) -    b = sum([(n - m) ** 2 for n in numbers]) -    return sqrt(b / len(numbers)) +    m = sum(numbers) / len(numbers) +    d = sqrt(sum([(n - m) ** 2 for n in numbers]) / len(numbers)) +    return d -    while True: -        n = int(eval(input())) -        if n == 0: -            break -        students = list(map(int, input().split()))[0:n] +    while eval(input()) != "0": +        students = list(map(int, input().split()))