let _ =
  let n = Scanf.scanf "%d\n" (fun n -> n) in
  let res = ref 0. in
  for i = 0 to n - 1 do
    let v, u = Scanf.scanf "%f %s\n" (fun v u -> v, u) in
    res := !res +. (if u = "JPY" then v else v *. 380000.0)
  done;
  !res |> Printf.printf "%f"