# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N = int(input())
XU = [tuple(input().split()) for _ in range(N)]

ans = 0
for x,u in XU:
    if u == "JPY":
        ans += float(x)
    else:
        ans += float(x)*380000

print(ans) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline N = int(input()) N int(input()) int input() input tuple(input().split()) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) tuple(input().split()) tuple input().split() ().split () input split XU = [tuple(input().split()) for _ in range(N)] XU [tuple(input().split()) for _ in range(N)] ans = 0 ans 0 for x,u in XU:
    if u == "JPY":
        ans += float(x)
    else:
        ans += float(x)*380000 x u XU if u == "JPY":
        ans += float(x)
    else:
        ans += float(x)*380000 u == "JPY" u "JPY" ans += float(x) ans float(x) float x ans += float(x)*380000 ans float(x)*380000 float(x) float x 380000 print(ans) print ans ans += float(x) float(x) ans input = sys.stdin.readline sys.stdin.readline input N = int(input()) int(input()) N XU = [tuple(input().split()) for _ in range(N)] [tuple(input().split()) for _ in range(N)] XU ans += float(x)*380000 float(x)*380000 ans ans = 0 0 ans
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
N = int(input())
XU = [tuple(input().split()) for _ in range(N)]

ans = 0
for x,u in XU:
    if u == "JPY":
        ans += float(x)
    else:
        ans += float(x)*380000

print(ans)