n=int(input())
s=input()
s_int=[0 if x=="." else 1 for x in s]

res=float("inf")
kouho=[[0]*i+[1]*(n-i) for i in range(n+1)]

for item in kouho:
  res=min(res,sum([abs(item[i]-s_int)for i in range(n)]))

print(res)