import std.stdio;

void main() {
    int n;
    readf("%d\n", &n);
    ulong ret = 0;
    enum scale = 10000;
    foreach (i; 0 .. n) {
        double d;
        string s;
        readf("%f %s\n", &d, &s);
        if (s == "JPY") {
            ret += (cast(ulong) d) * scale;
        } else {
            ret += (cast(ulong) (d * 1e8)) * 38;
        }
    }
    writefln("%d.%04d", ret / scale , ret % scale);
}
