n = int(input())
a = 0
for i in range(n):
  v, c = input().split()
  v = float(v)
  if c == "JPY":
    a += v
  else:
    a += v * 380000.0
print(a) n = int(input()) n int(input()) int input() input a = 0 a 0 for i in range(n):
  v, c = input().split()
  v = float(v)
  if c == "JPY":
    a += v
  else:
    a += v * 380000.0 i range(n) range n v, c = input().split() v input().split() ().split () input split c v = float(v) v float(v) float v if c == "JPY":
    a += v
  else:
    a += v * 380000.0 c == "JPY" c "JPY" a += v a v a += v * 380000.0 a v * 380000.0 v 380000.0 print(a) print a a += v * 380000.0 v * 380000.0 a n = int(input()) int(input()) n c = input().split() input().split() c a += v v a a = 0 0 a v, c = input().split() input().split() v v = float(v) float(v) v
n = int(input())
a = 0
for i in range(n):
  v, c = input().split()
  v = float(v)
  if c == "JPY":
    a += v
  else:
    a += v * 380000.0
print(a)