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