N=int(input())
xy=[list(input().split())for _ in range(N)]

ans=0
for x,y in xy:
    if y=='JPY':
        ans+=int(x)
    else:
        ans+=float(x)*380000

print(ans) 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 xy=[list(input().split())for _ in range(N)] xy [list(input().split())for _ in range(N)] ans=0 ans 0 for x,y in xy:
    if y=='JPY':
        ans+=int(x)
    else:
        ans+=float(x)*380000 x y xy if y=='JPY':
        ans+=int(x)
    else:
        ans+=float(x)*380000 y=='JPY' y 'JPY' ans+=int(x) ans int(x) int x ans+=float(x)*380000 ans float(x)*380000 float(x) float x 380000 print(ans) print ans ans+=float(x)*380000 float(x)*380000 ans ans=0 0 ans N=int(input()) int(input()) N xy=[list(input().split())for _ in range(N)] [list(input().split())for _ in range(N)] xy ans+=int(x) int(x) ans
N=int(input())
xy=[list(input().split())for _ in range(N)]

ans=0
for x,y in xy:
    if y=='JPY':
        ans+=int(x)
    else:
        ans+=float(x)*380000

print(ans)