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