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

ans = 0
for i in range(len(X)):
  if X[i][1] == "JPY":
    ans += float(X[i][0])
  else:
    ans += 380000.0 * float(X[i][0])
    
print(ans) n = int(input()) n int(input()) int input() input list(input().split()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(input().split()) list input().split() ().split () input split X = [list(input().split()) for i in range(n)] X [list(input().split()) for i in range(n)] ans = 0 ans 0 for i in range(len(X)):
  if X[i][1] == "JPY":
    ans += float(X[i][0])
  else:
    ans += 380000.0 * float(X[i][0])
     i range(len(X)) range len(X) len X if X[i][1] == "JPY":
    ans += float(X[i][0])
  else:
    ans += 380000.0 * float(X[i][0])
     X[i][1] == "JPY" X[i][1] [i] X i 1 "JPY" ans += float(X[i][0]) ans float(X[i][0]) float X[i][0] [i] X i 0 ans += 380000.0 * float(X[i][0]) ans 380000.0 * float(X[i][0]) 380000.0 float(X[i][0]) float X[i][0] [i] X i 0 print(ans) print ans ans = 0 0 ans ans += 380000.0 * float(X[i][0]) 380000.0 * float(X[i][0]) ans n = int(input()) int(input()) n X = [list(input().split()) for i in range(n)] [list(input().split()) for i in range(n)] X ans += float(X[i][0]) float(X[i][0]) ans
n = int(input())
X = [list(input().split()) for i in range(n)]

ans = 0
for i in range(len(X)):
  if X[i][1] == "JPY":
    ans += float(X[i][0])
  else:
    ans += 380000.0 * float(X[i][0])
    
print(ans)