parseInt(x) = parse(Int, x)
parseBigInt(x) = parse(BigInt, x)
parseFloat(x) = parse(Float64, x)
parseBigFloat(x) = parse(BigFloat, x)
parseMap(x::Array{SubString{String},1}) = map(parseInt, x)

function main()
    n=parseInt(readline())
    s=chomp(readline())
    ans=0
    flg=false
    for i in 1:n
        if s[i]=='.'
            if flg
                ans+=1
            end
        elseif !flg
            flg=true
        end
    end
    println(ans)
end
main()