def main():
    _ = int(input()) ###
    S = list(input())

    result = 10000
    for i in range(1, len(S)):
        a, b = S[:i], S[i:]
        count_sharp = a.count('#')
        count_dot = b.count('.')

        total = count_sharp + count_dot
        # print(a, b, count_sharp,count_dot, total)
        result = min(result, total)
    print(result)

main()
