n = int(input())
s = input()
nb = s.count('#')
nw = s.count('.')
if nw == n or nb == n:
    print(0)
    exit()
lb = 0
rw = nw
print(lb, rw)

b = False
ans = float('inf')
for i in range(n):
    if b == False and s[i] == '#':
        ans = min(ans, lb + rw)
        b = True
        lb += 1
    elif s[i] == '#':
        b = False
    elif s[i] == '.':
        rw -= 1
        b = False
print(ans)