using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;
using System.Text;
using System.IO;
using static System.Math;
namespace AtCoder
{
    class Program
    {
        static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); }
        static public List<long> Slist() { return ReadLine().Split().Select(long.Parse).ToList(); }

        static long Mod = (long)1e9 + 7;
        static long[] dirw = new long[] { -1, 0, 1, 0 };
        static long[] dirh = new long[] { 0, 1, 0, -1 };
        static string[] Sij;

        static void Main(string[] args)
        {
            //SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
            var N = Sarray()[0];
            var S = ReadLine();
            for(var i=0;i<S.Length;++i)
            {
                if (S[i] == '#')
                {
                    WriteLine(S.Skip(i).Count(s => s == '.'));
                    return;
                }
            }
            WriteLine(0);
            //Out.Flush();
        }
    }
}