n=int(input())
xu=[]
total=0
for i in range(n):
    xu.append([x for x in input().split()])

a=380000.0
for i in range(n):
    if xu[i][1]=="JPY":
        total+=float(xu[i][0])
    else:
        total+=float(xu[i][0])*a
print(total) n=int(input()) n int(input()) int input() input xu=[] xu [] total=0 total 0 for i in range(n):
    xu.append([x for x in input().split()]) i range(n) range n x for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() x xu.append([x for x in input().split()]) xu.append xu append [x for x in input().split()] a=380000.0 a 380000.0 for i in range(n):
    if xu[i][1]=="JPY":
        total+=float(xu[i][0])
    else:
        total+=float(xu[i][0])*a i range(n) range n if xu[i][1]=="JPY":
        total+=float(xu[i][0])
    else:
        total+=float(xu[i][0])*a xu[i][1]=="JPY" xu[i][1] [i] xu i 1 "JPY" total+=float(xu[i][0]) total float(xu[i][0]) float xu[i][0] [i] xu i 0 total+=float(xu[i][0])*a total float(xu[i][0])*a float(xu[i][0]) float xu[i][0] [i] xu i 0 a print(total) print total total+=float(xu[i][0]) float(xu[i][0]) total total=0 0 total total+=float(xu[i][0])*a float(xu[i][0])*a total n=int(input()) int(input()) n a=380000.0 380000.0 a xu=[] [] xu
n=int(input())
xu=[]
total=0
for i in range(n):
    xu.append([x for x in input().split()])

a=380000.0
for i in range(n):
    if xu[i][1]=="JPY":
        total+=float(xu[i][0])
    else:
        total+=float(xu[i][0])*a
print(total)
