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

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            char[] S = Console.ReadLine().ToArray();
            int plaseCH = Array.IndexOf(S, '#');
            char[] newary = new char[S.Length - plaseCH];
            if (plaseCH == -1 || plaseCH == S.Length - 1) 
            {
                Console.Write('0');
            }
            else
            {
                Array.Copy(S, plaseCH, newary, 0, S.Length - plaseCH);
                int ans = newary.Count(n => n == '.');
                //Console.WriteLine(plaseCH);
                Console.Write(ans);
            }
            

            //System.Threading.Thread.Sleep(1000);

        }
    }
}