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

namespace T1PBC2019C
{
    class MainClass
    {


        static int[] n;

        public static void Main(string[] args)
        {

            n = Array.ConvertAll(Console.ReadLine().Split().ToArray(), int.Parse);
            string s = Console.ReadLine();

            bool blk = false;
            bool wht = false;
            int bcnt = 0;
            int wcnt = 0;
            for(int i = 0; i < n[0]; i++)
            {
                if (!wht)
                {
                    if (s[i] == '#')
                    {
                        wht = true;
                    }
                }
                else
                {
                    if (s[i] == '.')
                    {
                        wcnt++;
                    }
                }

                if (!blk)
                {
                    if (s[n[0] - 1 - i] == '.')
                    {
                        blk = true;
                    }
                }
                else
                {
                    if (s[n[0] - 1 - i] == '#')
                    {
                        bcnt++;
                    }
                }

            }
            Console.WriteLine(Math.Min(wcnt, bcnt));

        }
    }
}
