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