# coding: utf-8

# https://atcoder.jp/contests/abc119


def main():
    N = int(input())
    x, u = [None] * N, [None] * N

    for i in range(N):
        line = input().split()
        x[i], u[i] = float(line[0]), line[1]
    
    jpy = 0
    btc = 0.0
    for i in range(N):
        if u[i] == "BTC":
            btc += x[i]
        else:
            jpy += x[i]
    
    return jpy + 380000.0 * btc


print(main()) def main():
    N = int(input())
    x, u = [None] * N, [None] * N

    for i in range(N):
        line = input().split()
        x[i], u[i] = float(line[0]), line[1]
    
    jpy = 0
    btc = 0.0
    for i in range(N):
        if u[i] == "BTC":
            btc += x[i]
        else:
            jpy += x[i]
    
    return jpy + 380000.0 * btc main N = int(input()) N int(input()) int input() input x, u = [None] * N, [None] * N x [None] * N [None] None N u [None] * N [None] None N for i in range(N):
        line = input().split()
        x[i], u[i] = float(line[0]), line[1]
    
     i range(N) range N line = input().split() line input().split() ().split () input split x[i], u[i] = float(line[0]), line[1] x[i] x i float(line[0]) float line[0] line 0 u[i] u i line[1] line 1 jpy = 0 jpy 0 btc = 0.0 btc 0.0 for i in range(N):
        if u[i] == "BTC":
            btc += x[i]
        else:
            jpy += x[i]
    
     i range(N) range N if u[i] == "BTC":
            btc += x[i]
        else:
            jpy += x[i]
    
     u[i] == "BTC" u[i] u i "BTC" btc += x[i] btc x[i] x i jpy += x[i] jpy x[i] x i return jpy + 380000.0 * btc jpy + 380000.0 * btc jpy 380000.0 * btc 380000.0 btc print(main()) print main() main def main():
    N = int(input())
    x, u = [None] * N, [None] * N

    for i in range(N):
        line = input().split()
        x[i], u[i] = float(line[0]), line[1]
    
    jpy = 0
    btc = 0.0
    for i in range(N):
        if u[i] == "BTC":
            btc += x[i]
        else:
            jpy += x[i]
    
    return jpy + 380000.0 * btc def main():
    N = int(input())
    x, u = [None] * N, [None] * N

    for i in range(N):
        line = input().split()
        x[i], u[i] = float(line[0]), line[1]
    
    jpy = 0
    btc = 0.0
    for i in range(N):
        if u[i] == "BTC":
            btc += x[i]
        else:
            jpy += x[i]
    
    return jpy + 380000.0 * btc main
# coding: utf-8

# https://atcoder.jp/contests/abc119


def main():
    N = int(input())
    x, u = [None] * N, [None] * N

    for i in range(N):
        line = input().split()
        x[i], u[i] = float(line[0]), line[1]
    
    jpy = 0
    btc = 0.0
    for i in range(N):
        if u[i] == "BTC":
            btc += x[i]
        else:
            jpy += x[i]
    
    return jpy + 380000.0 * btc


print(main())
