from collections import Counter
N = int(input())
S = input()
pt = S.find("#")
ct = 0
if pt == -1:
    print(0)
else:
    for i in range(pt, N):
        if S[i] == ".":
            ct += 1
    print(ct)