def chec(s):
    clis = []
    for i in range(len(s)):
        if i+1 != len(s) and s[i] == '#' and s[i+1] == '.' :
            clis.append(i)
    return len(clis)


n = int(input())
s = list(input())
print(chec(s))