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

for i in range(N):
    if S[i] == '.':
        S[i] = '0'
    else:
        S[i] = '1'

MIN = 10000000
for i in range(N):
    cnt = S[:i+1].count('1') + S[i+1:].count('0')
    MIN = min(MIN, cnt)
print(MIN)
