using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T1BC2019_C
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            string s = Console.ReadLine();

            bool zeroFlag = true;
            int count = 0;

            for (int i = 0; i < n; ++i)
            {
                bool whiteFlag = s[i] == '.';

                if (whiteFlag)
                {
                    if (zeroFlag)
                    {

                    }
                    else
                    {
                        ++count;
                    }
                }
                else
                {
                    zeroFlag = false;
                }
            }

            Console.WriteLine("{0}", count);
        }
    }
}
