N = int(input())
K = list(input())
count = 0
b=0

for i in range(N):
    if K[i]=='#':
        b = i
        break
    else :
        continue


for j in range(N-b-1):
    if K[j+b+1] == '.':
        count+=1

if count != N-1:
    print(count)
else:
    print(0)