N = int(input())
sumMoney = 0
for _ in range(N):
    x, u = input().split()
    if u == "BTC":
        sumMoney += float(x) * 380000.0
    else:
        sumMoney += float(x)
print(sumMoney) N = int(input()) N int(input()) int input() input sumMoney = 0 sumMoney 0 for _ in range(N):
    x, u = input().split()
    if u == "BTC":
        sumMoney += float(x) * 380000.0
    else:
        sumMoney += float(x) _ range(N) range N x, u = input().split() x input().split() ().split () input split u if u == "BTC":
        sumMoney += float(x) * 380000.0
    else:
        sumMoney += float(x) u == "BTC" u "BTC" sumMoney += float(x) * 380000.0 sumMoney float(x) * 380000.0 float(x) float x 380000.0 sumMoney += float(x) sumMoney float(x) float x print(sumMoney) print sumMoney x, u = input().split() input().split() x sumMoney += float(x) * 380000.0 float(x) * 380000.0 sumMoney sumMoney = 0 0 sumMoney N = int(input()) int(input()) N sumMoney += float(x) float(x) sumMoney u = input().split() input().split() u
N = int(input())
sumMoney = 0
for _ in range(N):
    x, u = input().split()
    if u == "BTC":
        sumMoney += float(x) * 380000.0
    else:
        sumMoney += float(x)
print(sumMoney)
