Option Strict On
Module Module1

    Sub Main()
        Dim n As Integer = Convert.ToInt32(Console.ReadLine())
        Dim S As String = Console.ReadLine()
        Dim counter As Integer = 0
        Dim sum As Integer = n
        For sakaime As Integer = 1 To n + 1
            For i As Integer = 1 To n
                If i < sakaime Then
                    If Mid(S, i, 1) = "." Then
                    Else
                        counter += 1
                    End If
                Else
                    If Mid(S, i, 1) = "#" Then
                    Else
                        counter += 1
                    End If

                End If


            Next
            If sum > counter Then
                sum = counter
            End If
            counter = 0
        Next
        Console.WriteLine(sum)
        Console.ReadLine()
    End Sub

End Module