n = gets.chomp.to_i
s = gets.chomp

white = s.gsub(/^\.+/, '').count('.')

black = s.gsub(/^\.+/, '').count('#')

if white < 1
    puts 0
end

if white <= black
    puts white
else
    puts black
end

