N = int(input())
mass = []

for i in range(N):
    a,b = input().split()
    a = float(a)
    if b == "BTC":
        a *= 380000.0
    mass.append(a)

print(sum(mass)) N = int(input()) N int(input()) int input() input mass = [] mass [] for i in range(N):
    a,b = input().split()
    a = float(a)
    if b == "BTC":
        a *= 380000.0
    mass.append(a) i range(N) range N a,b = input().split() a input().split() ().split () input split b a = float(a) a float(a) float a if b == "BTC":
        a *= 380000.0
     b == "BTC" b "BTC" a *= 380000.0 a 380000.0 mass.append(a) mass.append mass append a print(sum(mass)) print sum(mass) sum mass a = float(a) float(a) a a,b = input().split() input().split() a mass = [] [] mass b = input().split() input().split() b N = int(input()) int(input()) N a *= 380000.0 380000.0 a
N = int(input())
mass = []

for i in range(N):
    a,b = input().split()
    a = float(a)
    if b == "BTC":
        a *= 380000.0
    mass.append(a)

print(sum(mass))
