n = gets.chomp.to_i
ans = 0
n.times do |i|
    x, u = gets.chomp.split(" ")
    if u == "BTC"
        x = x.delete(".")
        x = x.to_i * 380000.0
    else
        x = x.to_i
        x = x * 100000000
    end
    ans += x
end
puts ans / 100000000