N = int(input())
S = input()

cnt = 0
for i in range(N-1):
    if S[i] == '#' and S[i+1] == '.':
        tmp_S = list(S)
        tmp_S[i+1] = '#'
        S = "".join(tmp_S)
        cnt += 1

print(cnt)
