n=int(input())
ans=0.0
for i in range(n):
  x,u=input().split()
  ans+=(float(x) if u=="JPY" else float(x)*380000.0)
print(ans) n=int(input()) n int(input()) int input() input ans=0.0 ans 0.0 for i in range(n):
  x,u=input().split()
  ans+=(float(x) if u=="JPY" else float(x)*380000.0) i range(n) range n x,u=input().split() x input().split() ().split () input split u ans+=(float(x) if u=="JPY" else float(x)*380000.0) ans float(x) if u=="JPY" else float(x)*380000.0 u=="JPY" u "JPY" float(x) float x float(x)*380000.0 float(x) float x 380000.0 print(ans) print ans u=input().split() input().split() u ans+=(float(x) if u=="JPY" else float(x)*380000.0) float(x) if u=="JPY" else float(x)*380000.0 ans n=int(input()) int(input()) n ans=0.0 0.0 ans x,u=input().split() input().split() x
n=int(input())
ans=0.0
for i in range(n):
  x,u=input().split()
  ans+=(float(x) if u=="JPY" else float(x)*380000.0)
print(ans)