N=int(input())
poti=[ input().split() for i in range(N)]
ans=0
for i in poti:
    if i[1]=="JPY":
        ans+=float(i[0])
    else:
        ans+=float(i[0])*380000.0
print(ans) N=int(input()) N int(input()) int input() input input().split() for i in range(N) for i in range(N) i range(N) range N for i in range(N) input().split() ().split () input split poti=[ input().split() for i in range(N)] poti [ input().split() for i in range(N)] ans=0 ans 0 for i in poti:
    if i[1]=="JPY":
        ans+=float(i[0])
    else:
        ans+=float(i[0])*380000.0 i poti if i[1]=="JPY":
        ans+=float(i[0])
    else:
        ans+=float(i[0])*380000.0 i[1]=="JPY" i[1] i 1 "JPY" ans+=float(i[0]) ans float(i[0]) float i[0] i 0 ans+=float(i[0])*380000.0 ans float(i[0])*380000.0 float(i[0]) float i[0] i 0 380000.0 print(ans) print ans N=int(input()) int(input()) N ans+=float(i[0]) float(i[0]) ans ans=0 0 ans poti=[ input().split() for i in range(N)] [ input().split() for i in range(N)] poti ans+=float(i[0])*380000.0 float(i[0])*380000.0 ans
N=int(input())
poti=[ input().split() for i in range(N)]
ans=0
for i in poti:
    if i[1]=="JPY":
        ans+=float(i[0])
    else:
        ans+=float(i[0])*380000.0
print(ans)