import sys
N = int(input())
S = (input())

s=[]
s1=""
for i in range(N):
    if S[i:i+2]==".#":
        s.append(i)
    elif  S[i:i+2]=="#.":
        s.append(i)
    if len(s)==2:
        break
print(s)
if len(s)<2:
    print("0")
    sys.exit()
else:
    cnt=0
    if S[0]=="#":
        cnt+=s[0]+1
    for i in range(N):
        if i-1>=s[1] and S[i]==".":
            cnt += 1
    print(cnt)