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

class Program
{
    static void Main(string[] args)
    {
        int n = int.Parse(Console.ReadLine());
        string s = Console.ReadLine();
        bool[] s_b = new bool[n];
        for (int i = 0; i < n; i++)
        {
            if (s[i] == '.') s_b[i] = true;
            else s_b[i] = false;
        }

        int ans = int.MaxValue;
        bool[] t_b = new bool[n];

        for (int i = 0; i < n; i++)
        {
            int tmp = 0;
            t_b[i] = !t_b[i];
            for (int j = 0; j < n; j++)
            {
                if (s_b[j] != t_b[j]) tmp++;
            }
            ans = Math.Min(ans, tmp);
        }

        Console.WriteLine(ans);
    }
}
