"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") # 無限

btc_price = 380000.0

n = int(input())
asset = 0.0
for _ in range(n):
    x,u = input().split()
    if u == "JPY":
        asset += int(x)
    else:
        asset += float(x) * btc_price
print(asset) """
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
""" import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip inf = float("inf") inf float("inf") float "inf" btc_price = 380000.0 btc_price 380000.0 n = int(input()) n int(input()) int input() input asset = 0.0 asset 0.0 for _ in range(n):
    x,u = input().split()
    if u == "JPY":
        asset += int(x)
    else:
        asset += float(x) * btc_price _ range(n) range n x,u = input().split() x input().split() ().split () input split u if u == "JPY":
        asset += int(x)
    else:
        asset += float(x) * btc_price u == "JPY" u "JPY" asset += int(x) asset int(x) int x asset += float(x) * btc_price asset float(x) * btc_price float(x) float x btc_price print(asset) print asset u = input().split() input().split() u asset += float(x) * btc_price float(x) * btc_price asset asset += int(x) int(x) asset n = int(input()) int(input()) n x,u = input().split() input().split() x inf = float("inf") float("inf") inf input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input btc_price = 380000.0 380000.0 btc_price asset = 0.0 0.0 asset
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") # 無限

btc_price = 380000.0

n = int(input())
asset = 0.0
for _ in range(n):
    x,u = input().split()
    if u == "JPY":
        asset += int(x)
    else:
        asset += float(x) * btc_price
print(asset)