n = int(input())
btc = 380000.0
a = 0
# 単位毎に加算する。
for _ in range(n):
    x, u = input().split()
    if u == 'JPY':
        a += int(x)
    elif u == 'BTC':
        a += float(x)*btc
print(a) n = int(input()) n int(input()) int input() input btc = 380000.0 btc 380000.0 a = 0 a 0 for _ in range(n):
    x, u = input().split()
    if u == 'JPY':
        a += int(x)
    elif u == 'BTC':
        a += float(x)*btc _ range(n) range n x, u = input().split() x input().split() ().split () input split u if u == 'JPY':
        a += int(x)
    elif u == 'BTC':
        a += float(x)*btc u == 'JPY' u 'JPY' a += int(x) a int(x) int x elif u == 'BTC':
        a += float(x)*btc u == 'BTC' u 'BTC' a += float(x)*btc a float(x)*btc float(x) float x btc print(a) print a a = 0 0 a x, u = input().split() input().split() x a += int(x) int(x) a btc = 380000.0 380000.0 btc a += float(x)*btc float(x)*btc a u = input().split() input().split() u n = int(input()) int(input()) n
n = int(input())
btc = 380000.0
a = 0
# 単位毎に加算する。
for _ in range(n):
    x, u = input().split()
    if u == 'JPY':
        a += int(x)
    elif u == 'BTC':
        a += float(x)*btc
print(a)
