n=int(input())
rate=380000
ans=0
for i in range(n):
    xi,ui=input().split()
    if ui=='JPY':
        ans+=int(xi)
    else:
        ans+=float(xi)*rate
print(ans) n=int(input()) n int(input()) int input() input rate=380000 rate 380000 ans=0 ans 0 for i in range(n):
    xi,ui=input().split()
    if ui=='JPY':
        ans+=int(xi)
    else:
        ans+=float(xi)*rate i range(n) range n xi,ui=input().split() xi input().split() ().split () input split ui if ui=='JPY':
        ans+=int(xi)
    else:
        ans+=float(xi)*rate ui=='JPY' ui 'JPY' ans+=int(xi) ans int(xi) int xi ans+=float(xi)*rate ans float(xi)*rate float(xi) float xi rate print(ans) print ans ui=input().split() input().split() ui ans+=int(xi) int(xi) ans rate=380000 380000 rate ans+=float(xi)*rate float(xi)*rate ans n=int(input()) int(input()) n xi,ui=input().split() input().split() xi ans=0 0 ans
n=int(input())
rate=380000
ans=0
for i in range(n):
    xi,ui=input().split()
    if ui=='JPY':
        ans+=int(xi)
    else:
        ans+=float(xi)*rate
print(ans)