import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
A = [input().split() for _ in range(N)]

ans = 0
for num, s in A:
    if s == 'JPY':
        ans += int(num)
    else:
        ans += 380000.0 * float(num)

print(ans)
 

 import sys sys sys.setrecursionlimit(10**8) sys.setrecursionlimit sys setrecursionlimit 10**8 10 8 def ii(): return int(sys.stdin.readline()) ii def mi(): return map(int, sys.stdin.readline().split()) mi def li(): return list(map(int, sys.stdin.readline().split())) li list(map(int, sys.stdin.readline().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)] li2 N N [ini]*i for _ in range(j) for _ in range(j) _ range(j) range j for _ in range(j) [ini]*i [ini] ini i def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A)) dp2 ini ini i i j j N = ii() N ii() ii input().split() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) input().split() ().split () input split A = [input().split() for _ in range(N)] A [input().split() for _ in range(N)] ans = 0 ans 0 for num, s in A:
    if s == 'JPY':
        ans += int(num)
    else:
        ans += 380000.0 * float(num) num s A if s == 'JPY':
        ans += int(num)
    else:
        ans += 380000.0 * float(num) s == 'JPY' s 'JPY' ans += int(num) ans int(num) int num ans += 380000.0 * float(num) ans 380000.0 * float(num) 380000.0 float(num) float num print(ans) print ans A = [input().split() for _ in range(N)] [input().split() for _ in range(N)] A def ii(): return int(sys.stdin.readline()) def ii(): return int(sys.stdin.readline()) ii def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)] def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)] li2 N = ii() ii() N def li(): return list(map(int, sys.stdin.readline().split())) def li(): return list(map(int, sys.stdin.readline().split())) li ans += int(num) int(num) ans def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A)) def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A)) dp2 def mi(): return map(int, sys.stdin.readline().split()) def mi(): return map(int, sys.stdin.readline().split()) mi ans = 0 0 ans ans += 380000.0 * float(num) 380000.0 * float(num) ans
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()
A = [input().split() for _ in range(N)]

ans = 0
for num, s in A:
    if s == 'JPY':
        ans += int(num)
    else:
        ans += 380000.0 * float(num)

print(ans)
 


