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

change_sum = 0

for i in range(int(N/2)-1):
  if S[int(N/2)-1-i] =="#" and S[int(N/2)-1-i] == ".":
    S = S[int(N/2)-1 -i:] + "." +S[:int(N/2) -i]
    change_sum += 1
  else:
    S = S[:int(N/2)-1 -i:] + "#" +S[:int(N/2) -i]    

for i in range(int(N/2)-1):
  if S[int(N/2)-1+i]=="#" and S[int(N/2)-1+i] == ".":
    S = S[int(N/2)-1+i:] + "#" +S[:int(N/2)+i]
    change_sum += 1
  else:
    S = S[int(N/2)-1 -i:] + "." +S[:int(N/2)+i]    

print(change_sum)