N = int(input())
XU = [list(map(str,input().split())) for _ in range(N)]

ans = 0

for i in range(N):
    if XU[i][1] == "JPY":
        ans += float(XU[i][0])
    else:
        ans += 380000*float(XU[i][0])

print(float(ans)) N = int(input()) N int(input()) int input() input list(map(str,input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(map(str,input().split())) list map(str,input().split()) map str input().split() ().split () input split XU = [list(map(str,input().split())) for _ in range(N)] XU [list(map(str,input().split())) for _ in range(N)] ans = 0 ans 0 for i in range(N):
    if XU[i][1] == "JPY":
        ans += float(XU[i][0])
    else:
        ans += 380000*float(XU[i][0]) i range(N) range N if XU[i][1] == "JPY":
        ans += float(XU[i][0])
    else:
        ans += 380000*float(XU[i][0]) XU[i][1] == "JPY" XU[i][1] [i] XU i 1 "JPY" ans += float(XU[i][0]) ans float(XU[i][0]) float XU[i][0] [i] XU i 0 ans += 380000*float(XU[i][0]) ans 380000*float(XU[i][0]) 380000 float(XU[i][0]) float XU[i][0] [i] XU i 0 print(float(ans)) print float(ans) float ans ans += float(XU[i][0]) float(XU[i][0]) ans N = int(input()) int(input()) N XU = [list(map(str,input().split())) for _ in range(N)] [list(map(str,input().split())) for _ in range(N)] XU ans = 0 0 ans ans += 380000*float(XU[i][0]) 380000*float(XU[i][0]) ans
N = int(input())
XU = [list(map(str,input().split())) for _ in range(N)]

ans = 0

for i in range(N):
    if XU[i][1] == "JPY":
        ans += float(XU[i][0])
    else:
        ans += 380000*float(XU[i][0])

print(float(ans))