n = int(input())
l = list(input())

result = l.count(".")
boundary = l.count(".")
for i in range(n):
    if l[i] == ".":
        boundary -= 1
    else:
        boundary += 1
result = min(result, boundary)    
print(result)