XU=[input().split() for i in range(int(input()))]
print(sum([float(x)*{"JPY":1,"BTC":380000}[u] for x,u in XU])) input().split() for i in range(int(input())) for i in range(int(input())) i range(int(input())) range int(input()) int input() input for i in range(int(input())) input().split() ().split () input split XU=[input().split() for i in range(int(input()))] XU [input().split() for i in range(int(input()))] 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] XU=[input().split() for i in range(int(input()))] [input().split() for i in range(int(input()))] XU
XU=[input().split() for i in range(int(input()))]
print(sum([float(x)*{"JPY":1,"BTC":380000}[u] for x,u in XU]))