import sys

N = int(input())
S = list(str(input()))

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

    if(i == N-1):
        print(0)
        sys.exit()

print(S.count('.'))

