n = int(input())
l = [input().split() for i in range(n)]

s= 0

for i in range(n):
    if l[i][1] == 'JPY':
        s+=float(l[i][0])
    else:
        s+=float(l[i][0])*380000.0
print(s) n = int(input()) n int(input()) int input() input input().split() for i in range(n) for i in range(n) i range(n) range n for i in range(n) input().split() ().split () input split l = [input().split() for i in range(n)] l [input().split() for i in range(n)] s= 0 s 0 for i in range(n):
    if l[i][1] == 'JPY':
        s+=float(l[i][0])
    else:
        s+=float(l[i][0])*380000.0 i range(n) range n if l[i][1] == 'JPY':
        s+=float(l[i][0])
    else:
        s+=float(l[i][0])*380000.0 l[i][1] == 'JPY' l[i][1] [i] l i 1 'JPY' s+=float(l[i][0]) s float(l[i][0]) float l[i][0] [i] l i 0 s+=float(l[i][0])*380000.0 s float(l[i][0])*380000.0 float(l[i][0]) float l[i][0] [i] l i 0 380000.0 print(s) print s n = int(input()) int(input()) n s+=float(l[i][0]) float(l[i][0]) s s= 0 0 s s+=float(l[i][0])*380000.0 float(l[i][0])*380000.0 s l = [input().split() for i in range(n)] [input().split() for i in range(n)] l
n = int(input())
l = [input().split() for i in range(n)]

s= 0

for i in range(n):
    if l[i][1] == 'JPY':
        s+=float(l[i][0])
    else:
        s+=float(l[i][0])*380000.0
print(s)