n = int(input())
s = input()
s_copy = s + '-'

ideal1 = '#' * n
ideal2 = '.' * n
ideal_idx = [i for i in range(n) if s_copy[i] == '.' and s_copy[i+1] =='#']
ideals = ['.' * (idx + 1) + '#' * (n - idx - 1) for idx in ideal_idx]
ideals.append(ideal1)
ideals.append(ideal2)
ideals = list(set(ideals))

counts = [0] * len(ideals)
for i, ideal in enumerate(ideals):
  for stone, ideal_stone in zip(s, ideal):
    if stone != ideal_stone:
      counts[i] += 1

print(ideals, min(counts))