N=int(input())
S=input()
S=list(S)

x=0
a=0
b=0

for i in range(N):
    if S[i]==".":
        a+=1
    else:
        b+=1

if a==N or b==N:
    print("0")
elif a>=b:
    x=N-a
    print(x)
else:
    x=N-b
    print(x)
