N = int(input())
x = []
u = []
for i in range(N):
  X, U = map(str,input().split())
  x.append(float(X))
  u.append(U)
  
rate = 380000.0
ans = 0
  
for i in range(N):
  if u[i] == 'JPY':
    ans += x[i]
  else:
    ans += x[i] * rate
    
print(ans) N = int(input()) N int(input()) int input() input x = [] x [] u = [] u [] for i in range(N):
  X, U = map(str,input().split())
  x.append(float(X))
  u.append(U)
   i range(N) range N X, U = map(str,input().split()) X map(str,input().split()) map str 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 rate = 380000.0 rate 380000.0 ans = 0 ans 0 for i in range(N):
  if u[i] == 'JPY':
    ans += x[i]
  else:
    ans += x[i] * rate
     i range(N) range N if u[i] == 'JPY':
    ans += x[i]
  else:
    ans += x[i] * rate
     u[i] == 'JPY' u[i] u i 'JPY' ans += x[i] ans x[i] x i ans += x[i] * rate ans x[i] * rate x[i] x i rate print(ans) print ans ans += x[i] x[i] ans X, U = map(str,input().split()) map(str,input().split()) X ans += x[i] * rate x[i] * rate ans x = [] [] x u = [] [] u N = int(input()) int(input()) N U = map(str,input().split()) map(str,input().split()) U rate = 380000.0 380000.0 rate ans = 0 0 ans
N = int(input())
x = []
u = []
for i in range(N):
  X, U = map(str,input().split())
  x.append(float(X))
  u.append(U)
  
rate = 380000.0
ans = 0
  
for i in range(N):
  if u[i] == 'JPY':
    ans += x[i]
  else:
    ans += x[i] * rate
    
print(ans)