n = int(input())
x_u = [input().split() for i in range(n)]

ans = 0
for x, u in x_u:
    if u == "JPY":
        ans += float(x)
    else:
        ans += float(x) * 380000.0
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 x_u = [input().split() for i in range(n)] x_u [input().split() for i in range(n)] ans = 0 ans 0 for x, u in x_u:
    if u == "JPY":
        ans += float(x)
    else:
        ans += float(x) * 380000.0 x u x_u if u == "JPY":
        ans += float(x)
    else:
        ans += float(x) * 380000.0 u == "JPY" u "JPY" ans += float(x) ans float(x) float x ans += float(x) * 380000.0 ans float(x) * 380000.0 float(x) float x 380000.0 print(ans) print ans ans = 0 0 ans ans += float(x) float(x) ans n = int(input()) int(input()) n ans += float(x) * 380000.0 float(x) * 380000.0 ans x_u = [input().split() for i in range(n)] [input().split() for i in range(n)] x_u
n = int(input())
x_u = [input().split() for i in range(n)]

ans = 0
for x, u in x_u:
    if u == "JPY":
        ans += float(x)
    else:
        ans += float(x) * 380000.0
print(ans)