N = int(input())
X = []
U = []
for _ in range(N):
    x, u = input().split()
    X.append(float(x))
    U.append(u)

ans = 0
for x, u in zip(X, U):
    if u == 'JPY':
        ans += x
    else:
        ans += x*380000.
print(ans) N = int(input()) N int(input()) int input() input X = [] X [] U = [] U [] for _ in range(N):
    x, u = input().split()
    X.append(float(x))
    U.append(u) _ range(N) range N x, u = input().split() x input().split() ().split () input split u X.append(float(x)) X.append X append float(x) float x U.append(u) U.append U append u ans = 0 ans 0 for x, u in zip(X, U):
    if u == 'JPY':
        ans += x
    else:
        ans += x*380000. x u zip(X, U) zip X U if u == 'JPY':
        ans += x
    else:
        ans += x*380000. u == 'JPY' u 'JPY' ans += x ans x ans += x*380000. ans x*380000. x 380000. print(ans) print ans U = [] [] U ans += x x ans ans = 0 0 ans X = [] [] X ans += x*380000. x*380000. ans N = int(input()) int(input()) N x, u = input().split() input().split() x u = input().split() input().split() u
N = int(input())
X = []
U = []
for _ in range(N):
    x, u = input().split()
    X.append(float(x))
    U.append(u)

ans = 0
for x, u in zip(X, U):
    if u == 'JPY':
        ans += x
    else:
        ans += x*380000.
print(ans)
