n = int(input())
s = list(input())

ans1 = 0
ans2 = 0


for i in range(n):
    if s[i] == '.':
         ans1 += 1
    else :
        ans2 += 1

if ans1 < ans2:
    print(ans1)   
else:
    print(ans2)