n = int(input())
ans = 0
for _ in range(n):
    x, u = input().split()
    if u == 'JPY':
        x = int(x)
        ans += x
    else:
        x = float(x)
        tmp = x*380000
        ans += tmp

print(ans) n = int(input()) n int(input()) int input() input ans = 0 ans 0 for _ in range(n):
    x, u = input().split()
    if u == 'JPY':
        x = int(x)
        ans += x
    else:
        x = float(x)
        tmp = x*380000
        ans += tmp _ range(n) range n x, u = input().split() x input().split() ().split () input split u if u == 'JPY':
        x = int(x)
        ans += x
    else:
        x = float(x)
        tmp = x*380000
        ans += tmp u == 'JPY' u 'JPY' x = int(x) x int(x) int x ans += x ans x x = float(x) x float(x) float x tmp = x*380000 tmp x*380000 x 380000 ans += tmp ans tmp print(ans) print ans ans += tmp tmp ans x, u = input().split() input().split() x x = int(x) int(x) x n = int(input()) int(input()) n tmp = x*380000 x*380000 tmp ans = 0 0 ans x = float(x) float(x) x ans += x x ans u = input().split() input().split() u
n = int(input())
ans = 0
for _ in range(n):
    x, u = input().split()
    if u == 'JPY':
        x = int(x)
        ans += x
    else:
        x = float(x)
        tmp = x*380000
        ans += tmp

print(ans)