import sys

def solve(N, S):

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

if __name__ == '__main__':

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