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

public class Program{
    public static void Main(){
        
        var n = int.Parse(Console.ReadLine());
        
        var s = Console.ReadLine();
        
        int[] cnt = new int[2];
        for(var i = 0; i < n; i++){
            if(s[i] == '.'){
                if(i != 0){
                    cnt[0]++;
                }
            }else{
                if(i != n- 1 ){
                    cnt[1]++;
                }
            }
        }
        var count = 0;
        if(cnt[0] < cnt[1]){
            count = cnt[0];
        }else{
            count = cnt[1];
        }
        Console.WriteLine("{0}",count);
    }
}
