n = gets.chomp.to_i
n += 1
 
 
s = gets.chomp
 
m = s =~ /#/
 
result = 0
 
if m == nil
  puts 0
else
  
 
  sliced = s.slice(m, s.length)
  
 
  sliced.chars.each do |i|
    
    if i == "."
      result += 1
    end
 
 
  end
 
 
  puts result
 
end