bit = 380000.0

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

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