N=int(input())
XU=[input().split() for i in range(N)]
print(sum([float(x)*{"JPY":1, "BTC":380000}[u] for x,u in XU])) N=int(input()) N int(input()) int input() input input().split() for i in range(N) for i in range(N) i range(N) range N for i in range(N) input().split() ().split () input split XU=[input().split() for i in range(N)] XU [input().split() for i in range(N)] float(x)*{"JPY":1, "BTC":380000}[u] for x,u in XU for x,u in XU x u XU for x,u in XU float(x)*{"JPY":1, "BTC":380000}[u] float(x) float x {"JPY":1, "BTC":380000}[u] {"JPY":1, "BTC":380000} "JPY" "JPY" 1 "BTC" "BTC" 380000 u print(sum([float(x)*{"JPY":1, "BTC":380000}[u] for x,u in XU])) print sum([float(x)*{"JPY":1, "BTC":380000}[u] for x,u in XU]) sum [float(x)*{"JPY":1, "BTC":380000}[u] for x,u in XU] N=int(input()) int(input()) N XU=[input().split() for i in range(N)] [input().split() for i in range(N)] XU
N=int(input())
XU=[input().split() for i in range(N)]
print(sum([float(x)*{"JPY":1, "BTC":380000}[u] for x,u in XU]))