N = int(input())
S = str(input())
counter_=0
counter*=0
for i in range(N):
  if(S[i]=="*"):
    counter_*_+=1
  else:
    counter_+=1
if(counter_*_>=counter_):
  print(counter_)
else:
  print(counter_*_)