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

using E = System.Linq.Enumerable;

public class Program
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine());
        var s = Console.ReadLine().Trim();

        Console.WriteLine(s.SkipWhile(x => x == '.').SkipWhile(x => x == '#').Count(x => x == '.'));
    }
}
