n=int(input())
l=[list(input().split()) for i in range(n)]
ans=0
for i in range(n):
  if l[i][1]=='BTC':
    ans+=float(l[i][0])*380000
  else:
    ans+=int(l[i][0])
print(ans) n=int(input()) n int(input()) int input() input list(input().split()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(input().split()) list input().split() ().split () input split l=[list(input().split()) for i in range(n)] l [list(input().split()) for i in range(n)] ans=0 ans 0 for i in range(n):
  if l[i][1]=='BTC':
    ans+=float(l[i][0])*380000
  else:
    ans+=int(l[i][0]) i range(n) range n if l[i][1]=='BTC':
    ans+=float(l[i][0])*380000
  else:
    ans+=int(l[i][0]) l[i][1]=='BTC' l[i][1] [i] l i 1 'BTC' ans+=float(l[i][0])*380000 ans float(l[i][0])*380000 float(l[i][0]) float l[i][0] [i] l i 0 380000 ans+=int(l[i][0]) ans int(l[i][0]) int l[i][0] [i] l i 0 print(ans) print ans n=int(input()) int(input()) n ans+=int(l[i][0]) int(l[i][0]) ans l=[list(input().split()) for i in range(n)] [list(input().split()) for i in range(n)] l ans=0 0 ans ans+=float(l[i][0])*380000 float(l[i][0])*380000 ans
n=int(input())
l=[list(input().split()) for i in range(n)]
ans=0
for i in range(n):
  if l[i][1]=='BTC':
    ans+=float(l[i][0])*380000
  else:
    ans+=int(l[i][0])
print(ans)