opendir (DIR, ".");
@dirs = grep (!/\./, grep (-d, readdir (DIR)));
close (DIR);
foreach $dir (@dirs) {
	opendir (SUBDIR, "$dir\/figures");
	my @images = grep (/(jpg|gif)/, readdir (SUBDIR));
	foreach $image (@images) {
		my $path =  "$dir\/figures\/$image";
		my $size = -s $path;
		print "$size\n" if $dir =~ /jvac/i;
		$TotalSize += $size;
	}
	
	closedir (SUBDIR);
}
print "$TotalSize\n";

