import numpy as np

dic={'.':0,'#':1}
N=int(input())
S=np.array([dic[i] for i in input()])

if S.sum()==0:
    print(0)
elif S.sum()==N:
    print(0)    
else:
    for i,j in enumerate(S):
        if j==1:
            print((S[i+1:]==0).sum())
            break