<?php
class MyTest {

    protected $input;

    public function __construct() {
        // # 複数行
        while (!empty($input = fgets(STDIN))) {
            $this->input[] = trim($input);    
        }
    }

    public function run() {
        $n = $this->input[0];
        $str = $this->input[1];
        preg_match_all("/#\./", $str, $matches);
        $ret = count($matches[0]);
        echo $ret;
        
    }
    
}

$test = new MyTest();
$test->run();