n = int(input())
x = []
u = []
sum = 0.0
for i in range(n):
    tmp1, tmp2 = input().split()
    x.append(float(tmp1))
    u.append(tmp2)
    if u[i] == "JPY":
        sum += x[i]
    else:
        sum += x[i] * 380000

print(sum) n = int(input()) n int(input()) int input() input x = [] x [] u = [] u [] sum = 0.0 sum 0.0 for i in range(n):
    tmp1, tmp2 = input().split()
    x.append(float(tmp1))
    u.append(tmp2)
    if u[i] == "JPY":
        sum += x[i]
    else:
        sum += x[i] * 380000 i range(n) range n tmp1, tmp2 = input().split() tmp1 input().split() ().split () input split tmp2 x.append(float(tmp1)) x.append x append float(tmp1) float tmp1 u.append(tmp2) u.append u append tmp2 if u[i] == "JPY":
        sum += x[i]
    else:
        sum += x[i] * 380000 u[i] == "JPY" u[i] u i "JPY" sum += x[i] sum x[i] x i sum += x[i] * 380000 sum x[i] * 380000 x[i] x i 380000 print(sum) print sum sum += x[i] * 380000 x[i] * 380000 sum tmp2 = input().split() input().split() tmp2 sum += x[i] x[i] sum n = int(input()) int(input()) n x = [] [] x u = [] [] u sum = 0.0 0.0 sum tmp1, tmp2 = input().split() input().split() tmp1
n = int(input())
x = []
u = []
sum = 0.0
for i in range(n):
    tmp1, tmp2 = input().split()
    x.append(float(tmp1))
    u.append(tmp2)
    if u[i] == "JPY":
        sum += x[i]
    else:
        sum += x[i] * 380000

print(sum)
