import std.algorithm;
import std.range;
import std.stdio;
import std.math;
import std.array;
import std.string;
import std.conv;

/// 数列の読み込み
auto readNums(T = int)() {
	return readln().chomp.split.map!(to!T).array;
}

auto minElement(R)(R r) {
    return r.reduce!((a, b) => min(a, b));
}

void main() {
	immutable n = readNums()[0];
	ulong yen = 0;
	ulong btc = 0;
	foreach(i; 0 .. n) {
		const s = readln().chomp.split;
		const value = s[0].splitter(".").joiner.stripLeft('0').to!ulong;
		if(s[1] == "JPY") {
			yen += value;
		} else {
			btc += value;
		}
	}
	writefln("%s", yen + cast(real)(btc * 380000) / 10 ^^ 8);
}