N = int(input())
x = list()
u = list()

for a in range(0, N):
    X, U = input().split()
    x.append(float(X))
    u.append(U)

sm = 0

for a, b in zip(x, u):
    if b == 'BTC':
        sm += a*380000
    else:
        sm += a

print(sm) N = int(input()) N int(input()) int input() input x = list() x list() list u = list() u list() list for a in range(0, N):
    X, U = input().split()
    x.append(float(X))
    u.append(U) a range(0, N) range 0 N X, U = input().split() X input().split() ().split () input split U x.append(float(X)) x.append x append float(X) float X u.append(U) u.append u append U sm = 0 sm 0 for a, b in zip(x, u):
    if b == 'BTC':
        sm += a*380000
    else:
        sm += a a b zip(x, u) zip x u if b == 'BTC':
        sm += a*380000
    else:
        sm += a b == 'BTC' b 'BTC' sm += a*380000 sm a*380000 a 380000 sm += a sm a print(sm) print sm sm = 0 0 sm N = int(input()) int(input()) N sm += a a sm sm += a*380000 a*380000 sm X, U = input().split() input().split() X u = list() list() u x = list() list() x U = input().split() input().split() U
N = int(input())
x = list()
u = list()

for a in range(0, N):
    X, U = input().split()
    x.append(float(X))
    u.append(U)

sm = 0

for a, b in zip(x, u):
    if b == 'BTC':
        sm += a*380000
    else:
        sm += a

print(sm)
