using System;
class Program
{
    static void Main(string[] args)
    {
        int N = int.Parse(Console.ReadLine());
        string S = Console.ReadLine();
        int dot = 0, sharpe = 0;
        for(int i = 0; i < N; i++)
        {
            if (S[i] == '.')
                dot++;
            else
                sharpe++;
        }
        Console.WriteLine(Math.Min(dot, sharpe));
    }
}
