#!/usr/bin/perl

# initialize vars
$sum = $N = 0;

# read sample from terminal
while (<>) {

	chomp;

	# print "$_\n" ;

	($_ eq "quit") && last;

	$N++;

	$sum += $_;

};

# print arithmetic mean
print "SUM: $sum  SIZE: $N  MEAN: ",$sum/$N,"\n";
