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

status = ""
ct = 0
for i in range(N):
    if S[i] == ".":
        status = "."
    elif status == "." and S[i] == "#":
        ct += 1
        S[i] == "."
    else:
        status = "#"
print(ct)