my ($n) = split(/\s+/, <>);
my ($s) = split(/\s+/, <>);

my $index = index($s, '#');
my $c = 0;
if ($index >= 0) {
    for (my $i=$index; $i<$n; $i++) {
	$c++ if substr($s, $i, 1) eq '.';
    }
}
print "$c\n";
