n = int(input())

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

rate = 380000.0
ans = 0.0
for i in range(n):
    x, u = input().split()
    x = float(x)
    ans += x * rate if u == 'BTC' else x
print(ans)   