n = int(input())
dms = [tuple(input().split()) for _ in range(n)]

ans = 0
for dm in dms:
    if dm[1] == 'JPY':
        ans += float(dm[0])
    else:
        ans += float(dm[0]) * 380000
print(ans) n = int(input()) n int(input()) int input() input tuple(input().split()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) tuple(input().split()) tuple input().split() ().split () input split dms = [tuple(input().split()) for _ in range(n)] dms [tuple(input().split()) for _ in range(n)] ans = 0 ans 0 for dm in dms:
    if dm[1] == 'JPY':
        ans += float(dm[0])
    else:
        ans += float(dm[0]) * 380000 dm dms if dm[1] == 'JPY':
        ans += float(dm[0])
    else:
        ans += float(dm[0]) * 380000 dm[1] == 'JPY' dm[1] dm 1 'JPY' ans += float(dm[0]) ans float(dm[0]) float dm[0] dm 0 ans += float(dm[0]) * 380000 ans float(dm[0]) * 380000 float(dm[0]) float dm[0] dm 0 380000 print(ans) print ans ans += float(dm[0]) float(dm[0]) ans dms = [tuple(input().split()) for _ in range(n)] [tuple(input().split()) for _ in range(n)] dms ans += float(dm[0]) * 380000 float(dm[0]) * 380000 ans n = int(input()) int(input()) n ans = 0 0 ans
n = int(input())
dms = [tuple(input().split()) for _ in range(n)]

ans = 0
for dm in dms:
    if dm[1] == 'JPY':
        ans += float(dm[0])
    else:
        ans += float(dm[0]) * 380000
print(ans)
