n = int(input())
xu = [input().split() for i in range(n)]
y = 0
b = 0
for j in xu:
  if j[1] == "JPY":
    y += int(j[0])
  else:
    b += float(j[0])
ans = y + 380000 * b
print(ans) n = int(input()) n int(input()) int input() input input().split() for i in range(n) for i in range(n) i range(n) range n for i in range(n) input().split() ().split () input split xu = [input().split() for i in range(n)] xu [input().split() for i in range(n)] y = 0 y 0 b = 0 b 0 for j in xu:
  if j[1] == "JPY":
    y += int(j[0])
  else:
    b += float(j[0]) j xu if j[1] == "JPY":
    y += int(j[0])
  else:
    b += float(j[0]) j[1] == "JPY" j[1] j 1 "JPY" y += int(j[0]) y int(j[0]) int j[0] j 0 b += float(j[0]) b float(j[0]) float j[0] j 0 ans = y + 380000 * b ans y + 380000 * b y 380000 * b 380000 b print(ans) print ans xu = [input().split() for i in range(n)] [input().split() for i in range(n)] xu ans = y + 380000 * b y + 380000 * b ans y += int(j[0]) int(j[0]) y n = int(input()) int(input()) n b = 0 0 b b += float(j[0]) float(j[0]) b y = 0 0 y
n = int(input())
xu = [input().split() for i in range(n)]
y = 0
b = 0
for j in xu:
  if j[1] == "JPY":
    y += int(j[0])
  else:
    b += float(j[0])
ans = y + 380000 * b
print(ans)