import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    ans=0
    for i in range(n):
        x,u=input().split()
        x=float(x)
        if u=='JPY':
            ans+=x
        else:
            ans+=x*380000
    print(ans)
resolve() import sys sys def input(): return sys.stdin.readline().strip() input def resolve():
    n=int(input())
    ans=0
    for i in range(n):
        x,u=input().split()
        x=float(x)
        if u=='JPY':
            ans+=x
        else:
            ans+=x*380000
    print(ans) resolve n=int(input()) n int(input()) int input() input ans=0 ans 0 for i in range(n):
        x,u=input().split()
        x=float(x)
        if u=='JPY':
            ans+=x
        else:
            ans+=x*380000
     i 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':
            ans+=x
        else:
            ans+=x*380000
     u=='JPY' u 'JPY' ans+=x ans x ans+=x*380000 ans x*380000 x 380000 print(ans) print ans resolve() resolve def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input def resolve():
    n=int(input())
    ans=0
    for i in range(n):
        x,u=input().split()
        x=float(x)
        if u=='JPY':
            ans+=x
        else:
            ans+=x*380000
    print(ans) def resolve():
    n=int(input())
    ans=0
    for i in range(n):
        x,u=input().split()
        x=float(x)
        if u=='JPY':
            ans+=x
        else:
            ans+=x*380000
    print(ans) resolve
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    ans=0
    for i in range(n):
        x,u=input().split()
        x=float(x)
        if u=='JPY':
            ans+=x
        else:
            ans+=x*380000
    print(ans)
resolve()