n = int(input())
otoshidama = []
for i in range(n):
    x, u = input().split()
    x = float(x)
    if u == "JPY":
        otoshidama.append(x)
    else:
        otoshidama.append(x*380000)
ans = sum(otoshidama)
print(f"{ans:.5f}") n = int(input()) n int(input()) int input() input otoshidama = [] otoshidama [] for i in range(n):
    x, u = input().split()
    x = float(x)
    if u == "JPY":
        otoshidama.append(x)
    else:
        otoshidama.append(x*380000) 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":
        otoshidama.append(x)
    else:
        otoshidama.append(x*380000) u == "JPY" u "JPY" otoshidama.append(x) otoshidama.append otoshidama append x otoshidama.append(x*380000) otoshidama.append otoshidama append x*380000 x 380000 ans = sum(otoshidama) ans sum(otoshidama) sum otoshidama print(f"{ans:.5f}") print f"{ans:.5f}" ans = sum(otoshidama) sum(otoshidama) ans x, u = input().split() input().split() x u = input().split() input().split() u n = int(input()) int(input()) n otoshidama = [] [] otoshidama x = float(x) float(x) x
n = int(input())
otoshidama = []
for i in range(n):
    x, u = input().split()
    x = float(x)
    if u == "JPY":
        otoshidama.append(x)
    else:
        otoshidama.append(x*380000)
ans = sum(otoshidama)
print(f"{ans:.5f}")
