n = int(input())
xu = [list(input().split()) for _ in range(n)]

money = 0

for k in xu:
    if k[1] == "JPY":
        money += float(k[0])
    else:
        money += float(k[0])*380000

print(money) n = int(input()) n int(input()) int input() input list(input().split()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(input().split()) list input().split() ().split () input split xu = [list(input().split()) for _ in range(n)] xu [list(input().split()) for _ in range(n)] money = 0 money 0 for k in xu:
    if k[1] == "JPY":
        money += float(k[0])
    else:
        money += float(k[0])*380000 k xu if k[1] == "JPY":
        money += float(k[0])
    else:
        money += float(k[0])*380000 k[1] == "JPY" k[1] k 1 "JPY" money += float(k[0]) money float(k[0]) float k[0] k 0 money += float(k[0])*380000 money float(k[0])*380000 float(k[0]) float k[0] k 0 380000 print(money) print money n = int(input()) int(input()) n money += float(k[0]) float(k[0]) money xu = [list(input().split()) for _ in range(n)] [list(input().split()) for _ in range(n)] xu money = 0 0 money money += float(k[0])*380000 float(k[0])*380000 money
n = int(input())
xu = [list(input().split()) for _ in range(n)]

money = 0

for k in xu:
    if k[1] == "JPY":
        money += float(k[0])
    else:
        money += float(k[0])*380000

print(money)