using System;
using System.Collections.Generic;
using System.Linq;

public class Program{
    public static void Main(){
        
        var n = int.Parse(Console.ReadLine());
        string line = Console.ReadLine();
        
        var cnt = 0;
        for(var i = 1; i < n; i++){
            if(line[i] == '.' && line[i - 1] == '#'){
                cnt++;
            }
        }
        
        Console.WriteLine("{0}",cnt);
    }
}
