N = int(input())
S = input()

S = list(S)
ans = 0
# for i in range(N):
#     if i+1 < N:
#         if S[i] == '#' and S[i+1] == '.':
#             S[i+1] = '#'
#             ans += 1
flag = 0
flag = S.count('#')
if flag > 0:
    ans = S.count('.')

print(ans)