N = int(input())
l = []
b = int(380000)
t = 0

for i in range (N):
  l.append(list(map(str, input().split())))
  
for j in range (N):
  
  if l[j][1] == "BTC":
    t += float(l[j][0])*b
    
  else:
    t += float(l[j][0])
    
print(t) N = int(input()) N int(input()) int input() input l = [] l [] b = int(380000) b int(380000) int 380000 t = 0 t 0 for i in range (N):
  l.append(list(map(str, input().split())))
   i range (N) range N l.append(list(map(str, input().split()))) l.append l append list(map(str, input().split())) list map(str, input().split()) map str input().split() ().split () input split for j in range (N):
  
  if l[j][1] == "BTC":
    t += float(l[j][0])*b
    
  else:
    t += float(l[j][0])
     j range (N) range N if l[j][1] == "BTC":
    t += float(l[j][0])*b
    
  else:
    t += float(l[j][0])
     l[j][1] == "BTC" l[j][1] [j] l j 1 "BTC" t += float(l[j][0])*b t float(l[j][0])*b float(l[j][0]) float l[j][0] [j] l j 0 b t += float(l[j][0]) t float(l[j][0]) float l[j][0] [j] l j 0 print(t) print t t += float(l[j][0]) float(l[j][0]) t b = int(380000) int(380000) b l = [] [] l N = int(input()) int(input()) N t = 0 0 t t += float(l[j][0])*b float(l[j][0])*b t
N = int(input())
l = []
b = int(380000)
t = 0

for i in range (N):
  l.append(list(map(str, input().split())))
  
for j in range (N):
  
  if l[j][1] == "BTC":
    t += float(l[j][0])*b
    
  else:
    t += float(l[j][0])
    
print(t)