n = gets.to_i
srray = gets.split("").map(&:to_s)
answer = []
answer.push(srray.count("."))
i=0
brray = []
crray = srray
while i<n
  brray.push(crray[i])
  crray[i]="nonsense"
  answer.push(brray.count("#")+crray.count("."))
  i+=1
end
puts answer.min
  