n = int(input())
a = [ list(input().split()) for _ in range(n) ]
#a = [['10','JPY'],['0.00001','BTC']]

yen = 0
btc = 0
for i,j in a:
  if j == 'JPY':
    yen += int(i)
  else:
    btc += float(i)

print(yen + btc * 380000) n = int(input()) n int(input()) int input() input list(input().split()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(input().split()) list input().split() ().split () input split a = [ list(input().split()) for _ in range(n) ] a [ list(input().split()) for _ in range(n) ] yen = 0 yen 0 btc = 0 btc 0 for i,j in a:
  if j == 'JPY':
    yen += int(i)
  else:
    btc += float(i) i j a if j == 'JPY':
    yen += int(i)
  else:
    btc += float(i) j == 'JPY' j 'JPY' yen += int(i) yen int(i) int i btc += float(i) btc float(i) float i print(yen + btc * 380000) print yen + btc * 380000 yen btc * 380000 btc 380000 btc = 0 0 btc n = int(input()) int(input()) n yen += int(i) int(i) yen btc += float(i) float(i) btc a = [ list(input().split()) for _ in range(n) ] [ list(input().split()) for _ in range(n) ] a yen = 0 0 yen
n = int(input())
a = [ list(input().split()) for _ in range(n) ]
#a = [['10','JPY'],['0.00001','BTC']]

yen = 0
btc = 0
for i,j in a:
  if j == 'JPY':
    yen += int(i)
  else:
    btc += float(i)

print(yen + btc * 380000)