n = int(input())
c = 0
for i in range(n):
    y, t = input().split()
    if t == 'BTC':
        yen = float(y)*380000.0
    else:
        yen = float(y)
    c += yen

print(c) n = int(input()) n int(input()) int input() input c = 0 c 0 for i in range(n):
    y, t = input().split()
    if t == 'BTC':
        yen = float(y)*380000.0
    else:
        yen = float(y)
    c += yen i range(n) range n y, t = input().split() y input().split() ().split () input split t if t == 'BTC':
        yen = float(y)*380000.0
    else:
        yen = float(y)
     t == 'BTC' t 'BTC' yen = float(y)*380000.0 yen float(y)*380000.0 float(y) float y 380000.0 yen = float(y) yen float(y) float y c += yen c yen print(c) print c yen = float(y)*380000.0 float(y)*380000.0 yen yen = float(y) float(y) yen c += yen yen c n = int(input()) int(input()) n y, t = input().split() input().split() y c = 0 0 c t = input().split() input().split() t
n = int(input())
c = 0
for i in range(n):
    y, t = input().split()
    if t == 'BTC':
        yen = float(y)*380000.0
    else:
        yen = float(y)
    c += yen

print(c)