import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
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()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

N=II()
XU=[list(SR().split()) for _ in range(N)]
ans = 0

for xu in XU:
    if xu[1] == 'JPY':
        ans += int(xu[0])
    else:
        ans += float(xu[0])*380000
print(ans) import sys sys import math math from collections import Counter import itertools itertools import fractions fractions import datetime datetime from decimal import Decimal 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()))
# 入力全てを整数に変換して1引いたものの配列を受け取る LI LI() for _ in range(rows_number) for _ in range(rows_number) _ range(rows_number) range rows_number for _ in range(rows_number) LI() LI def LLI(rows_number): return [LI() for _ in range(rows_number)] LLI rows_number rows_number def SR(): return sys.stdin.readline().rstrip() SR ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz' ascii_lowercase 'abcdefghijklmnopqrstuvwxyz' ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ascii_uppercase 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ' ascii_uppercase2 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ' p2D = lambda x: print(*x, sep="\n") p2D lambda x: print(*x, sep="\n") print(*x, sep="\n") print *x x sep="\n" sep "\n" x p2E = lambda x: print(''.join(x)) p2E lambda x: print(''.join(x)) print(''.join(x)) print ''.join(x) ''.join '' join x x p2S = lambda x: print(*x, sep=" ") p2S lambda x: print(*x, sep=" ") print(*x, sep=" ") print *x x sep=" " sep " " x N=II() N II() II list(SR().split()) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(SR().split()) list SR().split() ().split () SR split XU=[list(SR().split()) for _ in range(N)] XU [list(SR().split()) for _ in range(N)] ans = 0 ans 0 for xu in XU:
    if xu[1] == 'JPY':
        ans += int(xu[0])
    else:
        ans += float(xu[0])*380000 xu XU if xu[1] == 'JPY':
        ans += int(xu[0])
    else:
        ans += float(xu[0])*380000 xu[1] == 'JPY' xu[1] xu 1 'JPY' ans += int(xu[0]) ans int(xu[0]) int xu[0] xu 0 ans += float(xu[0])*380000 ans float(xu[0])*380000 float(xu[0]) float xu[0] xu 0 380000 print(ans) print ans ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ' ascii_uppercase2 p2S = lambda x: print(*x, sep=" ") lambda x: print(*x, sep=" ") p2S def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る def MI(): return map(int, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る MI def LLI(rows_number): return [LI() for _ in range(rows_number)] def LLI(rows_number): return [LI() for _ in range(rows_number)] LLI N=II() II() N ans += int(xu[0]) int(xu[0]) ans def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る LI ans += float(xu[0])*380000 float(xu[0])*380000 ans p2D = lambda x: print(*x, sep="\n") lambda x: print(*x, sep="\n") p2D ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' ascii_uppercase XU=[list(SR().split()) for _ in range(N)] [list(SR().split()) for _ in range(N)] XU def II(): return int(sys.stdin.readline()) def II(): return int(sys.stdin.readline()) II ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz' 'abcdefghijklmnopqrstuvwxyz' ascii_lowercase ans = 0 0 ans p2E = lambda x: print(''.join(x)) lambda x: print(''.join(x)) p2E def SR(): return sys.stdin.readline().rstrip() def SR(): return sys.stdin.readline().rstrip() SR
import sys
import math
from collections import Counter
import itertools
import fractions
import datetime
from decimal import Decimal
#from functools import reduce

# 入力を整数に変換して受け取る
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()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################

N=II()
XU=[list(SR().split()) for _ in range(N)]
ans = 0

for xu in XU:
    if xu[1] == 'JPY':
        ans += int(xu[0])
    else:
        ans += float(xu[0])*380000
print(ans)