import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int length = sc.nextInt();
        String str = sc.next();
        
        Pattern p = Pattern.compile("#.");
        Matcher m = p.matcher(str);
        int cnt = 0;
        while(m.find()){
            cnt++;
        }
        System.out.println(cnt);
    }
}