n = int(input())
ans = 0
for _ in range(n):
    x, u = input().split()
    c = 380000 if u == "BTC" else 1
    ans += float(x) * c
print(ans) n = int(input()) n int(input()) int input() input ans = 0 ans 0 for _ in range(n):
    x, u = input().split()
    c = 380000 if u == "BTC" else 1
    ans += float(x) * c _ range(n) range n x, u = input().split() x input().split() ().split () input split u c = 380000 if u == "BTC" else 1 c 380000 if u == "BTC" else 1 u == "BTC" u "BTC" 380000 1 ans += float(x) * c ans float(x) * c float(x) float x c print(ans) print ans u = input().split() input().split() u x, u = input().split() input().split() x ans = 0 0 ans c = 380000 if u == "BTC" else 1 380000 if u == "BTC" else 1 c ans += float(x) * c float(x) * c ans n = int(input()) int(input()) n
n = int(input())
ans = 0
for _ in range(n):
    x, u = input().split()
    c = 380000 if u == "BTC" else 1
    ans += float(x) * c
print(ans)