n = int(input())
total = 0
for _ in range(n):
  x, u = input().split()
  x = float(x)
  if u == 'JPY':
    total += x
  elif u == 'BTC':
    total += x * 380000.0
print(total) n = int(input()) n int(input()) int input() input total = 0 total 0 for _ in range(n):
  x, u = input().split()
  x = float(x)
  if u == 'JPY':
    total += x
  elif u == 'BTC':
    total += x * 380000.0 _ range(n) range n x, u = input().split() x input().split() ().split () input split u x = float(x) x float(x) float x if u == 'JPY':
    total += x
  elif u == 'BTC':
    total += x * 380000.0 u == 'JPY' u 'JPY' total += x total x elif u == 'BTC':
    total += x * 380000.0 u == 'BTC' u 'BTC' total += x * 380000.0 total x * 380000.0 x 380000.0 print(total) print total u = input().split() input().split() u n = int(input()) int(input()) n total = 0 0 total x, u = input().split() input().split() x total += x x total total += x * 380000.0 x * 380000.0 total x = float(x) float(x) x
n = int(input())
total = 0
for _ in range(n):
  x, u = input().split()
  x = float(x)
  if u == 'JPY':
    total += x
  elif u == 'BTC':
    total += x * 380000.0
print(total)