import java.util.Scanner;

class standardDev
{
  public static void main (String[] args)
  {
   //define
   int max, increment, count;
   double number, avg, avg2, avgSq, sum, sumSq, SD;
   Scanner scan = new Scanner( System.in );

   //initialize
   avg = 0.0; // average of the numbers
   avg2 = 0.0; // average of the numbers squared
   avgSq = 0.0; // sum of the numbers sq divided by the avg sq
   sum = 0.0; // sum of the numbers
   sumSq = 0.0; // sum of the squared numbers
   SD = 0.0; // the standard deviation

   //setup
   System.out.println("How many numbers?");
   max = scan.nextInt();
   count = 1;
   increment = 1;

   //loop
   while ( count <= max )
   {
     System.out.println( "Enter a number :" );
     number = scan.nextDouble();
     sum = sum + number;
     sumSq = sumSq + number * number;
     count = count + increment;
   }

   //calculate
   avg = sum/max; // find the average of the numbers
   avg2 = avg * avg; // find the square of the average
   avgSq = sumSq/avg2; // divide the sum of nums sq by the avg squared
   SD = Math.sqrt( avgSq - avg2 ); // find the sqroot of the difference

   //output
   System.out.println( "The standard deviation is " + SD );
  }
}