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

namespace Program
{
    interface Output
    {
        void Write(object str);
        void WriteLine(object str);
    }

    interface Input
    {
        int NextInt();
        string NextString();
    }

    class Console_ : Input, Output
    {
        Queue<string> param = new Queue<string>();
        int Input.NextInt()
        {
            if (param.Count == 0)
            {
                foreach (var item in Console.ReadLine().Split(' '))
                {
                    param.Enqueue(item);
                }
            }
            return int.Parse(param.Dequeue());
        }
        string Input.NextString()
        {
            if (param.Count == 0)
            {
                foreach (var item in Console.ReadLine().Split(' '))
                {
                    param.Enqueue(item);
                }
            }
            return param.Dequeue();
        }
        void Output.Write(object str)
        {
            System.Console.Write(str.ToString());
        }
        void Output.WriteLine(object str)
        {
            System.Console.WriteLine(str.ToString());
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            new Solver(new Console_(), new Console_()).Run();
        }
    }

    class Debug_ : Input
    {
        int i = 0;
        int Input.NextInt()
        {
            return (int)data[i++];
        }
        string Input.NextString()
        {
            return (string)data[i++];
        }
        object[] data =
        {
            "abcdefghijklmnopqrstuvwxyz",
            "abcdefghijklmnopqrstuavwxyz",
            "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
        };
    }

    class Solver
    {
        Input input;
        Output output;
        public Solver(Input input, Output output)
        {
            this.input = input;
            this.output = output;
        }

        public void Run()
        {
            var N = input.NextInt();
            uint stones = 0;
            uint mask = 0;
            foreach (var item in input.NextString().Select(e => e == '.' ? (uint)0 : (uint)1))
            {
                stones <<= 1;
                stones += item;
                mask <<= 1;
                mask += 1;
            }
            uint not = 0xffffffff;
            uint test1 = 0xAAAAAAAA;
            uint check1 = ((not ^ (stones ^ test1)) & mask);
            uint res1 = check1 & (check1 << 1) & test1;
            uint test2 = 0x55555555;
            uint check2 = ((not ^ (stones ^ test2)) & mask);
            uint res2 = check2 & (check2 << 1) & test2;
            uint res = res1 | res2;
            uint sum = 0;
            for (int i = 0; i < 32; ++i)
            {
                sum += res & (uint)1;
                res >>= 1;
            }
            output.WriteLine(sum);
        }
    }
}
