n = int(input())

mlis = []
jblis= []
for _ in range(n):
    a, b = input().split()
    mlis.append(float(a))
    jblis.append(b)
    
    
total = 0
for i in range(n):
    if jblis[i] == 'JPY':
        total += mlis[i]
    else:
        total += mlis[i]*380000.0

print(total) n = int(input()) n int(input()) int input() input mlis = [] mlis [] jblis= [] jblis [] for _ in range(n):
    a, b = input().split()
    mlis.append(float(a))
    jblis.append(b)
    
     _ range(n) range n a, b = input().split() a input().split() ().split () input split b mlis.append(float(a)) mlis.append mlis append float(a) float a jblis.append(b) jblis.append jblis append b total = 0 total 0 for i in range(n):
    if jblis[i] == 'JPY':
        total += mlis[i]
    else:
        total += mlis[i]*380000.0 i range(n) range n if jblis[i] == 'JPY':
        total += mlis[i]
    else:
        total += mlis[i]*380000.0 jblis[i] == 'JPY' jblis[i] jblis i 'JPY' total += mlis[i] total mlis[i] mlis i total += mlis[i]*380000.0 total mlis[i]*380000.0 mlis[i] mlis i 380000.0 print(total) print total total = 0 0 total n = int(input()) int(input()) n mlis = [] [] mlis total += mlis[i]*380000.0 mlis[i]*380000.0 total b = input().split() input().split() b jblis= [] [] jblis a, b = input().split() input().split() a total += mlis[i] mlis[i] total
n = int(input())

mlis = []
jblis= []
for _ in range(n):
    a, b = input().split()
    mlis.append(float(a))
    jblis.append(b)
    
    
total = 0
for i in range(n):
    if jblis[i] == 'JPY':
        total += mlis[i]
    else:
        total += mlis[i]*380000.0

print(total)