n = int(input())
list_bonus = [[s for s in input().split()] for j in range(0, n)]
ans = 0.0
for i in range(0, n):
    if list_bonus[i][1] == "JPY":
        ans += float(list_bonus[i][0])
    else:
        ans += float(list_bonus[i][0]) * 380000.0
print(ans) n = int(input()) n int(input()) int input() input [s for s in input().split()] for j in range(0, n) for j in range(0, n) j range(0, n) range 0 n for j in range(0, n) [s for s in input().split()] list_bonus = [[s for s in input().split()] for j in range(0, n)] list_bonus [[s for s in input().split()] for j in range(0, n)] ans = 0.0 ans 0.0 for i in range(0, n):
    if list_bonus[i][1] == "JPY":
        ans += float(list_bonus[i][0])
    else:
        ans += float(list_bonus[i][0]) * 380000.0 i range(0, n) range 0 n if list_bonus[i][1] == "JPY":
        ans += float(list_bonus[i][0])
    else:
        ans += float(list_bonus[i][0]) * 380000.0 list_bonus[i][1] == "JPY" list_bonus[i][1] [i] list_bonus i 1 "JPY" ans += float(list_bonus[i][0]) ans float(list_bonus[i][0]) float list_bonus[i][0] [i] list_bonus i 0 ans += float(list_bonus[i][0]) * 380000.0 ans float(list_bonus[i][0]) * 380000.0 float(list_bonus[i][0]) float list_bonus[i][0] [i] list_bonus i 0 380000.0 print(ans) print ans list_bonus = [[s for s in input().split()] for j in range(0, n)] [[s for s in input().split()] for j in range(0, n)] list_bonus ans += float(list_bonus[i][0]) float(list_bonus[i][0]) ans n = int(input()) int(input()) n ans += float(list_bonus[i][0]) * 380000.0 float(list_bonus[i][0]) * 380000.0 ans ans = 0.0 0.0 ans
n = int(input())
list_bonus = [[s for s in input().split()] for j in range(0, n)]
ans = 0.0
for i in range(0, n):
    if list_bonus[i][1] == "JPY":
        ans += float(list_bonus[i][0])
    else:
        ans += float(list_bonus[i][0]) * 380000.0
print(ans)