def main():
    N = int(input())
    S = list(input())

    count = 0
    for i in range(len(S) - 1):
        one = S[i]
        two = S[i+1]
        if (one == '#') and (two == '.'):
            count += 1
            S[i+1] = '#'

    print(count)





main()