N = int(input())
S = input()
count = 0

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

if i == N-1:
    pass
else:
    for j in range(i,N):
        if S[j] == '.':
            count += 1
print(count)