N=int(input())
total = 0
for i in range(N):
  x,u=input().split()
  total = total + float(x) * [1,380000.0][u=="BTC"]
print(total) N=int(input()) N int(input()) int input() input total = 0 total 0 for i in range(N):
  x,u=input().split()
  total = total + float(x) * [1,380000.0][u=="BTC"] i range(N) range N x,u=input().split() x input().split() ().split () input split u total = total + float(x) * [1,380000.0][u=="BTC"] total total + float(x) * [1,380000.0][u=="BTC"] total float(x) * [1,380000.0][u=="BTC"] float(x) float x [1,380000.0][u=="BTC"] [1,380000.0] 1 380000.0 u=="BTC" u "BTC" print(total) print total u=input().split() input().split() u total = total + float(x) * [1,380000.0][u=="BTC"] total + float(x) * [1,380000.0][u=="BTC"] total total = 0 0 total N=int(input()) int(input()) N x,u=input().split() input().split() x
N=int(input())
total = 0
for i in range(N):
  x,u=input().split()
  total = total + float(x) * [1,380000.0][u=="BTC"]
print(total)