# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
answer = 0
for _ in range(N):
    x, u = sr().split()
    if u == 'JPY':
        answer += int(x)
    else:
        answer += float(x) * 380000
print(answer) import sys sys sr = lambda: sys.stdin.readline().rstrip() sr 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 ir = lambda: int(sr()) ir lambda: int(sr()) int(sr()) int sr() sr lr = lambda: list(map(int, sr().split())) lr lambda: list(map(int, sr().split())) list(map(int, sr().split())) list map(int, sr().split()) map int sr().split() ().split () sr split N = ir() N ir() ir answer = 0 answer 0 for _ in range(N):
    x, u = sr().split()
    if u == 'JPY':
        answer += int(x)
    else:
        answer += float(x) * 380000 _ range(N) range N x, u = sr().split() x sr().split() ().split () sr split u if u == 'JPY':
        answer += int(x)
    else:
        answer += float(x) * 380000 u == 'JPY' u 'JPY' answer += int(x) answer int(x) int x answer += float(x) * 380000 answer float(x) * 380000 float(x) float x 380000 print(answer) print answer answer += int(x) int(x) answer u = sr().split() sr().split() u lr = lambda: list(map(int, sr().split())) lambda: list(map(int, sr().split())) lr answer = 0 0 answer ir = lambda: int(sr()) lambda: int(sr()) ir N = ir() ir() N sr = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() sr x, u = sr().split() sr().split() x answer += float(x) * 380000 float(x) * 380000 answer
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
answer = 0
for _ in range(N):
    x, u = sr().split()
    if u == 'JPY':
        answer += int(x)
    else:
        answer += float(x) * 380000
print(answer)
