# coding: utf-8
import re
import bisect
from datetime import datetime as dt
n = input()
s = raw_input()

m = 10 ** 6
for i in range(len(s) + 1):
    left = s[:i]
    right = s[i:]
    m = min(m, left.count('#') + right.count('*'))
print m
