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

flag = False
count_answer = 0
count_temp = 0

for i in range(N):
  if S[i] == '#':
    if flag is False:
      flag = True
    else:
      T = []
      for j in range(N):
        if j >= i:
          T.append('#')
        else:
          T.append('.')
      for j in range(N):
        if S[j] != T[j]:
          count_temp = count_temp + 1
      if count_answer > count_temp:
        count_answer = count_temp
      count_temp = 0
      print(T)

print(count_answer)