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