n = int(input())
res = 0.0
for _ in range(n):
    x, u = input().split()
    x = float(x)
    res += x if u == 'JPY' else x * 380000.0
print(res) n = int(input()) n int(input()) int input() input res = 0.0 res 0.0 for _ in range(n):
    x, u = input().split()
    x = float(x)
    res += x if u == 'JPY' else x * 380000.0 _ range(n) range n x, u = input().split() x input().split() ().split () input split u x = float(x) x float(x) float x res += x if u == 'JPY' else x * 380000.0 res x if u == 'JPY' else x * 380000.0 u == 'JPY' u 'JPY' x x * 380000.0 x 380000.0 print(res) print res res = 0.0 0.0 res x = float(x) float(x) x res += x if u == 'JPY' else x * 380000.0 x if u == 'JPY' else x * 380000.0 res x, u = input().split() input().split() x n = int(input()) int(input()) n u = input().split() input().split() u
n = int(input())
res = 0.0
for _ in range(n):
    x, u = input().split()
    x = float(x)
    res += x if u == 'JPY' else x * 380000.0
print(res)
