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

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

            int sum = 0;
            bool found = false;
            for (int i = 0; i < n; i++)
            {
                if (found && s[i] == '#') sum++;
                if (s[i] == '.') found = true;
            }
            Console.WriteLine(sum);
        }
    }
}
