n = int(input())
ans = 0.0
rate = 380000.0
for i in range(n):
  a, b = input().split()
  if b == "JPY":
    ans += float(a)
  else:
    ans += (float(a)*rate)
print(ans) n = int(input()) n int(input()) int input() input ans = 0.0 ans 0.0 rate = 380000.0 rate 380000.0 for i in range(n):
  a, b = input().split()
  if b == "JPY":
    ans += float(a)
  else:
    ans += (float(a)*rate) i range(n) range n a, b = input().split() a input().split() ().split () input split b if b == "JPY":
    ans += float(a)
  else:
    ans += (float(a)*rate) b == "JPY" b "JPY" ans += float(a) ans float(a) float a ans += (float(a)*rate) ans float(a)*rate float(a) float a rate print(ans) print ans ans = 0.0 0.0 ans b = input().split() input().split() b ans += float(a) float(a) ans rate = 380000.0 380000.0 rate ans += (float(a)*rate) float(a)*rate ans n = int(input()) int(input()) n a, b = input().split() input().split() a
n = int(input())
ans = 0.0
rate = 380000.0
for i in range(n):
  a, b = input().split()
  if b == "JPY":
    ans += float(a)
  else:
    ans += (float(a)*rate)
print(ans)