import sys
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, = [int(num) for num in lines.pop(0).split(" ")]
def iter_value_and_unit():
    for line in lines:
        value, unit = line.split(" ")
        value = float(value)
        if unit == "BTC":
            yield 380000.0 * value
        else:
            yield value

print(sum(iter_value_and_unit())) import sys sys s.rstrip("\n") for s in sys.stdin.readlines() for s in sys.stdin.readlines() s sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines for s in sys.stdin.readlines() s.rstrip("\n") s.rstrip s rstrip "\n" lines = [s.rstrip("\n") for s in sys.stdin.readlines()] lines [s.rstrip("\n") for s in sys.stdin.readlines()] int(num) for num in lines.pop(0).split(" ") for num in lines.pop(0).split(" ") num lines.pop(0).split(" ") lines.pop(0).split lines.pop(0) lines.pop lines pop 0 split " " for num in lines.pop(0).split(" ") int(num) int num n, = [int(num) for num in lines.pop(0).split(" ")] n [int(num) for num in lines.pop(0).split(" ")] def iter_value_and_unit():
    for line in lines:
        value, unit = line.split(" ")
        value = float(value)
        if unit == "BTC":
            yield 380000.0 * value
        else:
            yield value iter_value_and_unit for line in lines:
        value, unit = line.split(" ")
        value = float(value)
        if unit == "BTC":
            yield 380000.0 * value
        else:
            yield value line lines value, unit = line.split(" ") value line.split(" ") line.split line split " " unit value = float(value) value float(value) float value if unit == "BTC":
            yield 380000.0 * value
        else:
            yield value unit == "BTC" unit "BTC" yield 380000.0 * value 380000.0 * value 380000.0 value yield value value print(sum(iter_value_and_unit())) print sum(iter_value_and_unit()) sum iter_value_and_unit() iter_value_and_unit n, = [int(num) for num in lines.pop(0).split(" ")] [int(num) for num in lines.pop(0).split(" ")] n lines = [s.rstrip("\n") for s in sys.stdin.readlines()] [s.rstrip("\n") for s in sys.stdin.readlines()] lines def iter_value_and_unit():
    for line in lines:
        value, unit = line.split(" ")
        value = float(value)
        if unit == "BTC":
            yield 380000.0 * value
        else:
            yield value def iter_value_and_unit():
    for line in lines:
        value, unit = line.split(" ")
        value = float(value)
        if unit == "BTC":
            yield 380000.0 * value
        else:
            yield value iter_value_and_unit
import sys
lines = [s.rstrip("\n") for s in sys.stdin.readlines()]
n, = [int(num) for num in lines.pop(0).split(" ")]
def iter_value_and_unit():
    for line in lines:
        value, unit = line.split(" ")
        value = float(value)
        if unit == "BTC":
            yield 380000.0 * value
        else:
            yield value

print(sum(iter_value_and_unit()))
