n = int(input())
a = 0
for i in range(n):
    x, u = input().split()
    x = float(x)
    if u == 'BTC':
        x *= 380000
    a += x
print(a) n = int(input()) n int(input()) int input() input a = 0 a 0 for i in range(n):
    x, u = input().split()
    x = float(x)
    if u == 'BTC':
        x *= 380000
    a += x i range(n) range n x, u = input().split() x input().split() ().split () input split u x = float(x) x float(x) float x if u == 'BTC':
        x *= 380000
     u == 'BTC' u 'BTC' x *= 380000 x 380000 a += x a x print(a) print a u = input().split() input().split() u a = 0 0 a x, u = input().split() input().split() x n = int(input()) int(input()) n x = float(x) float(x) x x *= 380000 380000 x a += x x a
n = int(input())
a = 0
for i in range(n):
    x, u = input().split()
    x = float(x)
    if u == 'BTC':
        x *= 380000
    a += x
print(a)