n=int(input())
S=[0 if i=='.' else 1 for i in input()]
if sum(S)==0 or sum(S)==n:
    print(0)
    exit()

start=0
for i in range(n):
    if S[i]==1:
        start=i
        break

S=S[start:]
ans=0
for s in S:
    if s==0:
        ans+=1
print(ans)