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