n=gets.to_i
s=gets.chomp.split("")
isSharp=false
count=0
n.times do|i|
	if !isSharp and s[i]=='#'
		isSharp=true
		count+=1
	elsif isSharp and s[i]=="." and i>=n-2 and s[i+1]!='#'
		count+=1
	end
end
print count