n = int(input())
apple = []
for _ in range(n):
    apple.append(list(map(str, input().split())))
count = 0
for i in apple:
    if i[1] == "JPY":
        count += int(i[0])
    else:
        count += 38e4 * float(i[0])
print(count) n = int(input()) n int(input()) int input() input apple = [] apple [] for _ in range(n):
    apple.append(list(map(str, input().split()))) _ range(n) range n apple.append(list(map(str, input().split()))) apple.append apple append list(map(str, input().split())) list map(str, input().split()) map str input().split() ().split () input split count = 0 count 0 for i in apple:
    if i[1] == "JPY":
        count += int(i[0])
    else:
        count += 38e4 * float(i[0]) i apple if i[1] == "JPY":
        count += int(i[0])
    else:
        count += 38e4 * float(i[0]) i[1] == "JPY" i[1] i 1 "JPY" count += int(i[0]) count int(i[0]) int i[0] i 0 count += 38e4 * float(i[0]) count 38e4 * float(i[0]) 38e4 float(i[0]) float i[0] i 0 print(count) print count count += int(i[0]) int(i[0]) count n = int(input()) int(input()) n apple = [] [] apple count += 38e4 * float(i[0]) 38e4 * float(i[0]) count count = 0 0 count
n = int(input())
apple = []
for _ in range(n):
    apple.append(list(map(str, input().split())))
count = 0
for i in apple:
    if i[1] == "JPY":
        count += int(i[0])
    else:
        count += 38e4 * float(i[0])
print(count)