N = input()
S = input()

count = 0
for n in range(int(N)):
    if (S[n-1] == '#') & (S[n] == '.'):
        count = count+1
        m = n + 1
        if n > m:
            while(S[m]):
                if S[m] == '.':
                    count = count + 1
                    n = m + 1
                else:
                    break

print(count)