def actual(n, X, U):
    # 変換: 1[BTC] == 380000.0[円]
    amount_yen = 0

    for x, u in zip(X, U):
        if u == 'JPY':
            amount_yen += x
        if u == 'BTC':
            amount_yen += x * 380000.0

    return amount_yen

n = int(input())
X = []
U = []

for _ in range(n):
  x, u = input().split()
  X.append(float(x))
  U.append(u)
  
print(actual(n, X, U))   def actual(n, X, U):
    # 変換: 1[BTC] == 380000.0[円]
    amount_yen = 0

    for x, u in zip(X, U):
        if u == 'JPY':
            amount_yen += x
        if u == 'BTC':
            amount_yen += x * 380000.0

    return amount_yen actual amount_yen = 0 amount_yen 0 for x, u in zip(X, U):
        if u == 'JPY':
            amount_yen += x
        if u == 'BTC':
            amount_yen += x * 380000.0

     x u zip(X, U) zip X U if u == 'JPY':
            amount_yen += x
         u == 'JPY' u 'JPY' amount_yen += x amount_yen x if u == 'BTC':
            amount_yen += x * 380000.0

     u == 'BTC' u 'BTC' amount_yen += x * 380000.0 amount_yen x * 380000.0 x 380000.0 return amount_yen amount_yen n n X X U U n = int(input()) n int(input()) int input() input X = [] X [] U = [] U [] for _ in range(n):
  x, u = input().split()
  X.append(float(x))
  U.append(u)
   _ range(n) range n x, u = input().split() x input().split() ().split () input split u X.append(float(x)) X.append X append float(x) float x U.append(u) U.append U append u print(actual(n, X, U)) print actual(n, X, U) actual n X U X = [] [] X U = [] [] U n = int(input()) int(input()) n u = input().split() input().split() u x, u = input().split() input().split() x def actual(n, X, U):
    # 変換: 1[BTC] == 380000.0[円]
    amount_yen = 0

    for x, u in zip(X, U):
        if u == 'JPY':
            amount_yen += x
        if u == 'BTC':
            amount_yen += x * 380000.0

    return amount_yen def actual(n, X, U):
    # 変換: 1[BTC] == 380000.0[円]
    amount_yen = 0

    for x, u in zip(X, U):
        if u == 'JPY':
            amount_yen += x
        if u == 'BTC':
            amount_yen += x * 380000.0

    return amount_yen actual
def actual(n, X, U):
    # 変換: 1[BTC] == 380000.0[円]
    amount_yen = 0

    for x, u in zip(X, U):
        if u == 'JPY':
            amount_yen += x
        if u == 'BTC':
            amount_yen += x * 380000.0

    return amount_yen

n = int(input())
X = []
U = []

for _ in range(n):
  x, u = input().split()
  X.append(float(x))
  U.append(u)
  
print(actual(n, X, U))  