n = int(input())
ans = 0
a = 0,1
for i in range(n):
    a,b = input().split()
    if b == "BTC":
        a = float(a)*380000
        ans += a
    else:
        ans += int(a)
print(ans) n = int(input()) n int(input()) int input() input ans = 0 ans 0 a = 0,1 a a = 0,1 0 1 for i in range(n):
    a,b = input().split()
    if b == "BTC":
        a = float(a)*380000
        ans += a
    else:
        ans += int(a) i range(n) range n a,b = input().split() a input().split() ().split () input split b if b == "BTC":
        a = float(a)*380000
        ans += a
    else:
        ans += int(a) b == "BTC" b "BTC" a = float(a)*380000 a float(a)*380000 float(a) float a 380000 ans += a ans a ans += int(a) ans int(a) int a print(ans) print ans n = int(input()) int(input()) n a,b = input().split() input().split() a ans = 0 0 ans a = float(a)*380000 float(a)*380000 a a = 0,1 a = 0,1 a ans += a a ans b = input().split() input().split() b ans += int(a) int(a) ans
n = int(input())
ans = 0
a = 0,1
for i in range(n):
    a,b = input().split()
    if b == "BTC":
        a = float(a)*380000
        ans += a
    else:
        ans += int(a)
print(ans)