import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()

    val M = 100000000L
    val xu = Array(n) { (sc.nextDouble() * M).toLong() to sc.next() }

    val sum = xu
        .map { if (it.second == "JPY") it.first else it.first * 380000 }
        .sum()
        .toDouble()
        .div(M)

    println(String.format("%.6f", sum))
}