n=int(input())
c=0
for i in range(n):
    a,b=map(str,input().split())
    if b=="BTC":
        c+=float(a)*380000
    else:
        c+=float(a)
print(c) n=int(input()) n int(input()) int input() input c=0 c 0 for i in range(n):
    a,b=map(str,input().split())
    if b=="BTC":
        c+=float(a)*380000
    else:
        c+=float(a) i range(n) range n a,b=map(str,input().split()) a map(str,input().split()) map str input().split() ().split () input split b if b=="BTC":
        c+=float(a)*380000
    else:
        c+=float(a) b=="BTC" b "BTC" c+=float(a)*380000 c float(a)*380000 float(a) float a 380000 c+=float(a) c float(a) float a print(c) print c c=0 0 c n=int(input()) int(input()) n c+=float(a)*380000 float(a)*380000 c c+=float(a) float(a) c a,b=map(str,input().split()) map(str,input().split()) a b=map(str,input().split()) map(str,input().split()) b
n=int(input())
c=0
for i in range(n):
    a,b=map(str,input().split())
    if b=="BTC":
        c+=float(a)*380000
    else:
        c+=float(a)
print(c)