N = int(input())
moneies = [input().split() for i in range(N)]

ans = 0
for money in moneies:
    if money[1] == "JPY":
        ans += int(money[0])
    else:
        ans += float(money[0]) * 380000
print(ans) 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 moneies = [input().split() for i in range(N)] moneies [input().split() for i in range(N)] ans = 0 ans 0 for money in moneies:
    if money[1] == "JPY":
        ans += int(money[0])
    else:
        ans += float(money[0]) * 380000 money moneies if money[1] == "JPY":
        ans += int(money[0])
    else:
        ans += float(money[0]) * 380000 money[1] == "JPY" money[1] money 1 "JPY" ans += int(money[0]) ans int(money[0]) int money[0] money 0 ans += float(money[0]) * 380000 ans float(money[0]) * 380000 float(money[0]) float money[0] money 0 380000 print(ans) print ans moneies = [input().split() for i in range(N)] [input().split() for i in range(N)] moneies N = int(input()) int(input()) N ans += float(money[0]) * 380000 float(money[0]) * 380000 ans ans = 0 0 ans ans += int(money[0]) int(money[0]) ans
N = int(input())
moneies = [input().split() for i in range(N)]

ans = 0
for money in moneies:
    if money[1] == "JPY":
        ans += int(money[0])
    else:
        ans += float(money[0]) * 380000
print(ans)