N = int(input())
btc_a = 380000.0
btc_b = btc_a / (10 ** 8)
ans = 0.0
for i in range(N):
  x, n = input().split()
  if n == "JPY":
    ans += int(x)
  else:
    a, b = map(int, x.split("."))
    ans += a * btc_a
    ans += b * btc_b
print(ans) N = int(input()) N int(input()) int input() input btc_a = 380000.0 btc_a 380000.0 btc_b = btc_a / (10 ** 8) btc_b btc_a / (10 ** 8) btc_a 10 ** 8 10 8 ans = 0.0 ans 0.0 for i in range(N):
  x, n = input().split()
  if n == "JPY":
    ans += int(x)
  else:
    a, b = map(int, x.split("."))
    ans += a * btc_a
    ans += b * btc_b i range(N) range N x, n = input().split() x input().split() ().split () input split n if n == "JPY":
    ans += int(x)
  else:
    a, b = map(int, x.split("."))
    ans += a * btc_a
    ans += b * btc_b n == "JPY" n "JPY" ans += int(x) ans int(x) int x a, b = map(int, x.split(".")) a map(int, x.split(".")) map int x.split(".") x.split x split "." b ans += a * btc_a ans a * btc_a a btc_a ans += b * btc_b ans b * btc_b b btc_b print(ans) print ans ans += b * btc_b b * btc_b ans n = input().split() input().split() n a, b = map(int, x.split(".")) map(int, x.split(".")) a ans += a * btc_a a * btc_a ans b = map(int, x.split(".")) map(int, x.split(".")) b ans += int(x) int(x) ans btc_a = 380000.0 380000.0 btc_a btc_b = btc_a / (10 ** 8) btc_a / (10 ** 8) btc_b ans = 0.0 0.0 ans N = int(input()) int(input()) N x, n = input().split() input().split() x
N = int(input())
btc_a = 380000.0
btc_b = btc_a / (10 ** 8)
ans = 0.0
for i in range(N):
  x, n = input().split()
  if n == "JPY":
    ans += int(x)
  else:
    a, b = map(int, x.split("."))
    ans += a * btc_a
    ans += b * btc_b
print(ans)