using System;
using System.Collections.Generic;
public class Tenka1Begginer2019C {
    public static void Main() {
        int N = int.Parse(System.Console.ReadLine());
        string S = System.Console.ReadLine();

        int white = 0, black = 0;
        for(int i = 0; i < N; i++) {
            if (i == 0) {
                if (S[i] != '.') {
                    white++;
                }
                continue;
            }
            if (i == N - 1) {
                if (S[i] == '.') {
                    black++;
                }
                continue;
            }

            if (S[i] == '.') {
                black++;
            } else {
                white++;
            }
        }

        if (white < black) System.Console.WriteLine(white);
        else System.Console.WriteLine(black);
    }
}