n = input()
n = int(n)
s = input()

sl = []
for i in range(n):
    sl += s[i]

c = 0
cs = []
for i in range(n):
    l = ['.']*n
    for k in range(i, n):
        l[i] = '#'
    for k in range(n):
        if l[k] != sl[k]:
            c += 1
    cs += [c]
print(min(cs))