N = int(input())

sum = 0.0
for _ in range(N):
    x,u = input().split()
    x = float(x)
    if u=="JPY":
        sum = x + sum
        continue
    x = 380000*x
    sum = sum + x
print(sum) N = int(input()) N int(input()) int input() input sum = 0.0 sum 0.0 for _ in range(N):
    x,u = input().split()
    x = float(x)
    if u=="JPY":
        sum = x + sum
        continue
    x = 380000*x
    sum = sum + x _ range(N) range N x,u = input().split() x input().split() ().split () input split u x = float(x) x float(x) float x if u=="JPY":
        sum = x + sum
        continue
     u=="JPY" u "JPY" sum = x + sum sum x + sum x sum continue x = 380000*x x 380000*x 380000 x sum = sum + x sum sum + x sum x print(sum) print sum x = 380000*x 380000*x x sum = sum + x sum + x sum u = input().split() input().split() u N = int(input()) int(input()) N x = float(x) float(x) x sum = x + sum x + sum sum sum = 0.0 0.0 sum x,u = input().split() input().split() x
N = int(input())

sum = 0.0
for _ in range(N):
    x,u = input().split()
    x = float(x)
    if u=="JPY":
        sum = x + sum
        continue
    x = 380000*x
    sum = sum + x
print(sum)