import numpy as np
n=2
a=[input() for i in range(n)]
N=int(a[0])
S=list(a[1])

kazuXD=0
flg=0
kazu=0
for i in range(N):
  if flg==0:
    if S[i]==".":
      kazu+=1
    else:
      flg=1

for i in range(kazu,N):
  if S[i]==".":
    S[i]="#"
    kazuXD+=1
  
print(kazuXD)