import numpy as np

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

for i in S:
    if S.sum()==0:
        print(0)
        break
    elif i==1:
        print((S[i:]!=1).sum())
        break