#TPBC
N = int(input())
S = input()

for i in range(N):
    if S[i] == '#':
        first_black = i
        break
    first_black = i

cnt = 0
if first_black == N-1:
    cnt = 0
else:
    for i in range(first_black,N,1):
        if S[i] == '.':
            cnt += 1

print(cnt)