n=input()
n=int(n)

s=input()

tr = "#"
ans_1 = 0
ans_2=0
for i in range(n):
	if tr != s[i]:
		ans_1 +=1

tr ="."
for i in range(n):
	if tr != s[i]:
		ans_2 +=1
        
print(ans_1 if ans_1 <= ans_2 else ans_2)