import std.stdio;
import std.string;
import std.conv;
import std.algorithm;

void main() {
	auto N = to!int( split(readln())[0] );
	real result = 0;
	foreach (i; 0 .. N) {
		auto data = split(readln());
		auto x = to!real(data[0]), u = data[1];
		u == "JPY" ? (result += x) : (result += 380000.0 * x);
	}
	writeln(result);
}