n=int(input())
m=[list(map(str,input().split())) for i in range(n)]

cnt=0

for i in range(n):
  m[i][0]=float(m[i][0])
  if m[i][1]=='BTC':
    m[i][0]*=380000.0
  cnt+=m[i][0]

print(cnt) n=int(input()) n int(input()) int input() input list(map(str,input().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(map(str,input().split())) list map(str,input().split()) map str input().split() ().split () input split m=[list(map(str,input().split())) for i in range(n)] m [list(map(str,input().split())) for i in range(n)] cnt=0 cnt 0 for i in range(n):
  m[i][0]=float(m[i][0])
  if m[i][1]=='BTC':
    m[i][0]*=380000.0
  cnt+=m[i][0] i range(n) range n m[i][0]=float(m[i][0]) m[i][0] [i] m i 0 float(m[i][0]) float m[i][0] [i] m i 0 if m[i][1]=='BTC':
    m[i][0]*=380000.0
   m[i][1]=='BTC' m[i][1] [i] m i 1 'BTC' m[i][0]*=380000.0 m[i][0] [i] m i 0 380000.0 cnt+=m[i][0] cnt m[i][0] [i] m i 0 print(cnt) print cnt n=int(input()) int(input()) n cnt=0 0 cnt cnt+=m[i][0] m[i][0] cnt m=[list(map(str,input().split())) for i in range(n)] [list(map(str,input().split())) for i in range(n)] m
n=int(input())
m=[list(map(str,input().split())) for i in range(n)]

cnt=0

for i in range(n):
  m[i][0]=float(m[i][0])
  if m[i][1]=='BTC':
    m[i][0]*=380000.0
  cnt+=m[i][0]

print(cnt)