attrs = Array.new
while line = $stdin.gets
    attrs << line.chomp
end

N = attrs.shift.to_i
S = attrs[0].split("")

b = 0
w = 0

S.each do |l|
  if l == "." then
    w += 1
  else
    b += 1
  end
end

puts [w, b].min