n = int(input())

ans = 0
for _ in range(n):
    x, u = input().split()
    if u == 'JPY':
        ans += int(x)
    else:
        ind = x.index('.')
        ans += int(x[:ind]) * 380000
        ans += int(x[ind+1:]) * 38 / 10000

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':
        ans += int(x)
    else:
        ind = x.index('.')
        ans += int(x[:ind]) * 380000
        ans += int(x[ind+1:]) * 38 / 10000 _ range(n) range n x, u = input().split() x input().split() ().split () input split u if u == 'JPY':
        ans += int(x)
    else:
        ind = x.index('.')
        ans += int(x[:ind]) * 380000
        ans += int(x[ind+1:]) * 38 / 10000 u == 'JPY' u 'JPY' ans += int(x) ans int(x) int x ind = x.index('.') ind x.index('.') x.index x index '.' ans += int(x[:ind]) * 380000 ans int(x[:ind]) * 380000 int(x[:ind]) int x[:ind] x :ind ind 380000 ans += int(x[ind+1:]) * 38 / 10000 ans int(x[ind+1:]) * 38 / 10000 int(x[ind+1:]) * 38 int(x[ind+1:]) int x[ind+1:] x ind+1: ind+1 ind 1 38 10000 print(ans) print ans n = int(input()) int(input()) n ind = x.index('.') x.index('.') ind ans += int(x) int(x) ans ans += int(x[ind+1:]) * 38 / 10000 int(x[ind+1:]) * 38 / 10000 ans x, u = input().split() input().split() x u = input().split() input().split() u ans += int(x[:ind]) * 380000 int(x[:ind]) * 380000 ans ans = 0 0 ans
n = int(input())

ans = 0
for _ in range(n):
    x, u = input().split()
    if u == 'JPY':
        ans += int(x)
    else:
        ind = x.index('.')
        ans += int(x[:ind]) * 380000
        ans += int(x[ind+1:]) * 38 / 10000

print(ans)