def readinput():
    n=int(input())
    dama=[]
    for _ in range(n):
        a,b=input().split()
        dama.append((a,b))
    return n,dama

def main(n,dama):
    sum=0.0
    for x,u in dama:
        if u=='JPY':
            sum+=int(x)
        else:
            sum+=float(x)*380000.0
    return sum

if __name__=='__main__':
    n,dama=readinput()
    ans=main(n,dama)
    print(ans) def readinput():
    n=int(input())
    dama=[]
    for _ in range(n):
        a,b=input().split()
        dama.append((a,b))
    return n,dama readinput n=int(input()) n int(input()) int input() input dama=[] dama [] for _ in range(n):
        a,b=input().split()
        dama.append((a,b))
     _ range(n) range n a,b=input().split() a input().split() ().split () input split b dama.append((a,b)) dama.append dama append (a,b) a b return n,dama return n,dama n dama def main(n,dama):
    sum=0.0
    for x,u in dama:
        if u=='JPY':
            sum+=int(x)
        else:
            sum+=float(x)*380000.0
    return sum main sum=0.0 sum 0.0 for x,u in dama:
        if u=='JPY':
            sum+=int(x)
        else:
            sum+=float(x)*380000.0
     x u dama if u=='JPY':
            sum+=int(x)
        else:
            sum+=float(x)*380000.0
     u=='JPY' u 'JPY' sum+=int(x) sum int(x) int x sum+=float(x)*380000.0 sum float(x)*380000.0 float(x) float x 380000.0 return sum sum n n dama dama if __name__=='__main__':
    n,dama=readinput()
    ans=main(n,dama)
    print(ans) __name__=='__main__' __name__ '__main__' n,dama=readinput() n readinput() readinput dama ans=main(n,dama) ans main(n,dama) main n dama print(ans) print ans n,dama=readinput() readinput() n def main(n,dama):
    sum=0.0
    for x,u in dama:
        if u=='JPY':
            sum+=int(x)
        else:
            sum+=float(x)*380000.0
    return sum def main(n,dama):
    sum=0.0
    for x,u in dama:
        if u=='JPY':
            sum+=int(x)
        else:
            sum+=float(x)*380000.0
    return sum main ans=main(n,dama) main(n,dama) ans dama=readinput() readinput() dama def readinput():
    n=int(input())
    dama=[]
    for _ in range(n):
        a,b=input().split()
        dama.append((a,b))
    return n,dama def readinput():
    n=int(input())
    dama=[]
    for _ in range(n):
        a,b=input().split()
        dama.append((a,b))
    return n,dama readinput
def readinput():
    n=int(input())
    dama=[]
    for _ in range(n):
        a,b=input().split()
        dama.append((a,b))
    return n,dama

def main(n,dama):
    sum=0.0
    for x,u in dama:
        if u=='JPY':
            sum+=int(x)
        else:
            sum+=float(x)*380000.0
    return sum

if __name__=='__main__':
    n,dama=readinput()
    ans=main(n,dama)
    print(ans)
