N = int(input())

TO_JPY = {"JPY": 1, "BTC": 380000}

ans = 0

for i in range(N):
    x, u = input().split()
    x = float(x)
    ans += x * TO_JPY[u]
    
print(ans) N = int(input()) N int(input()) int input() input TO_JPY = {"JPY": 1, "BTC": 380000} TO_JPY {"JPY": 1, "BTC": 380000} "JPY" "JPY" 1 "BTC" "BTC" 380000 ans = 0 ans 0 for i in range(N):
    x, u = input().split()
    x = float(x)
    ans += x * TO_JPY[u]
     i range(N) range N x, u = input().split() x input().split() ().split () input split u x = float(x) x float(x) float x ans += x * TO_JPY[u] ans x * TO_JPY[u] x TO_JPY[u] TO_JPY u print(ans) print ans x, u = input().split() input().split() x N = int(input()) int(input()) N ans += x * TO_JPY[u] x * TO_JPY[u] ans x = float(x) float(x) x u = input().split() input().split() u TO_JPY = {"JPY": 1, "BTC": 380000} {"JPY": 1, "BTC": 380000} TO_JPY ans = 0 0 ans
N = int(input())

TO_JPY = {"JPY": 1, "BTC": 380000}

ans = 0

for i in range(N):
    x, u = input().split()
    x = float(x)
    ans += x * TO_JPY[u]
    
print(ans)