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

count = 0
lines = ""

for i in range(N):
    if i == 0 or i ==N:
        if S[i] == "#" and S[i+1] == ".":
            count += 1
            #lines = lines + "#"
        else:
            #lines = lines + [""]
            pass
    else:
        if i == 0 and S[i]=="#":
            if S[i+1] == ".":
                #lines = lines + "."
                count += 1
        else:
            pass
            #lines = lines + S[i]
print(count)
