def main():
  n = int(input())
  xy = [map(str, input().split()) for _ in range(n)]
  x, u = [list(i) for i in zip(*xy)]
  sum=0
  for i in range(0,n):
    if u[i]=='JPY':
      sum+=float(x[i])
    else:
      sum+=float(x[i])*380000
  print(sum)
  
main() def main():
  n = int(input())
  xy = [map(str, input().split()) for _ in range(n)]
  x, u = [list(i) for i in zip(*xy)]
  sum=0
  for i in range(0,n):
    if u[i]=='JPY':
      sum+=float(x[i])
    else:
      sum+=float(x[i])*380000
  print(sum)
   main n = int(input()) n int(input()) int input() input map(str, input().split()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) map(str, input().split()) map str input().split() ().split () input split xy = [map(str, input().split()) for _ in range(n)] xy [map(str, input().split()) for _ in range(n)] list(i) for i in zip(*xy) for i in zip(*xy) i zip(*xy) zip *xy xy for i in zip(*xy) list(i) list i x, u = [list(i) for i in zip(*xy)] x [list(i) for i in zip(*xy)] u sum=0 sum 0 for i in range(0,n):
    if u[i]=='JPY':
      sum+=float(x[i])
    else:
      sum+=float(x[i])*380000
   i range(0,n) range 0 n if u[i]=='JPY':
      sum+=float(x[i])
    else:
      sum+=float(x[i])*380000
   u[i]=='JPY' u[i] u i 'JPY' sum+=float(x[i]) sum float(x[i]) float x[i] x i sum+=float(x[i])*380000 sum float(x[i])*380000 float(x[i]) float x[i] x i 380000 print(sum) print sum main() main def main():
  n = int(input())
  xy = [map(str, input().split()) for _ in range(n)]
  x, u = [list(i) for i in zip(*xy)]
  sum=0
  for i in range(0,n):
    if u[i]=='JPY':
      sum+=float(x[i])
    else:
      sum+=float(x[i])*380000
  print(sum)
   def main():
  n = int(input())
  xy = [map(str, input().split()) for _ in range(n)]
  x, u = [list(i) for i in zip(*xy)]
  sum=0
  for i in range(0,n):
    if u[i]=='JPY':
      sum+=float(x[i])
    else:
      sum+=float(x[i])*380000
  print(sum)
   main
def main():
  n = int(input())
  xy = [map(str, input().split()) for _ in range(n)]
  x, u = [list(i) for i in zip(*xy)]
  sum=0
  for i in range(0,n):
    if u[i]=='JPY':
      sum+=float(x[i])
    else:
      sum+=float(x[i])*380000
  print(sum)
  
main()