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


def func(input_s):
    count = input_s.count(".")
    for c, i in enumerate(s):
        if c == "." and input_s[i - 1] == "#":
            tmp_str = input_s
            tmp_str[i - 1] = "."
            tmp_count = func(tmp_str)
            count = min(tmp_count, count)
    return count


pre = ""
print(func(s))