a = int(input())
ar = list(input())
go = "OFF"
count = 0
for i in range(a):
    if go == "ON":
        if ar[i] == "." and ar[i-1] == "#":
            count += 1
    else:
        if ar[i] == "#":
            go = "ON"
print(count)