N = int(input())
S = input()

num_w = 0
num_b = 0
while num_w <= N - 1 and S[num_w] == '.':
  num_w += 1
if num_w == N:
  print(0)
  exit()
while num_b <= N - 1 and S[N - 1 - num_b] == '#':
  num_b += 1
if num_b == N:
  print(0)
  exit()
print(num_w, num_b)
target = S[num_w: N - num_b]
print(min(target.count('.'), target.count('#')))
