import sys

def solve(N, S):

    ans = 0
    prev = S[0]
    for i in xrange(len(S)-1):
        if prev == "#" and S[i+1] == ".":
            ans += 1
            prev = "#"
        else:
            prev = S[i+1]
    return ans

if __name__ == '__main__':

    N = sys.stdin.readline().strip()
    S = sys.stdin.readline().strip()
    ans = solve(int(N), S)
    print ans