n = int(input())
total = 0
for i in range(n):
    x, u = map(str, input().split())
    x = float(x)
    if u == 'BTC':
        x *= 380000
    total += x
print(total) n = int(input()) n int(input()) int input() input total = 0 total 0 for i in range(n):
    x, u = map(str, input().split())
    x = float(x)
    if u == 'BTC':
        x *= 380000
    total += x i range(n) range n x, u = map(str, input().split()) x map(str, input().split()) map str input().split() ().split () input split u x = float(x) x float(x) float x if u == 'BTC':
        x *= 380000
     u == 'BTC' u 'BTC' x *= 380000 x 380000 total += x total x print(total) print total x *= 380000 380000 x total = 0 0 total u = map(str, input().split()) map(str, input().split()) u x, u = map(str, input().split()) map(str, input().split()) x total += x x total n = int(input()) int(input()) n x = float(x) float(x) x
n = int(input())
total = 0
for i in range(n):
    x, u = map(str, input().split())
    x = float(x)
    if u == 'BTC':
        x *= 380000
    total += x
print(total)