#!/usr/bin/perl -w

$lastblock = shift || 86;

while(<>) {
	chomp;
	my($blockno,$time) = split /:/;
	$tottime +=$time;
	++$ctr;
	last if ($lastblock == $ctr);
}
$average = $tottime / ($lastblock + 1);

print "$tottime\t$ctr\t$lastblock\t$average\n";
