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

black = 0
min_val = 200001
tot_white = s.count('.')

for i in range(len(s)):
    if s[i] == '#':
        black += 1
    else:
        tot_white -=1
    print(tot_white, black)
    min_val = min(min_val, tot_white+black)

print(min_val)