using System;

namespace VSC
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(System.Console.ReadLine());
            string S = System.Console.ReadLine();

            char[] str = S.ToCharArray();
            
            int K = 0;

            for(int i = S.IndexOf('#') ; i < N; i++ )                
              if ('.' == str[i])K++;

            System.Console.Write(K);
        }
    }
}
