N = gets.to_i
S = gets.chomp

count = 0
while c = S.slice!(0)
    if c == "#"
        c = S.slice!(0)
        if c == "."
            count += 1
        else
            redo
        end
    end
end
puts count
