# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
N = int(input())
S = list(str(input()))

C = ["#" for _ in range(N)]

minN = sys.maxsize
for i in range(N+1) :
  cnt = 0
  for j in range(N) :
    if S[j] != C[j] :
      cnt += 1
  minN = min(minN, cnt)
  if i < N :
    C[i] = "."

print (minN)