N=int(input())
S=list(input())
l = ["#"]*N
L=[]
ans=10**9
for i in range(N):
    count=0
    l[i]="."
    for j in range(N):
        if l[j]!=S[j]:
            count+=1
        #print(count)
    ans=min(ans,count)

print(ans)

