let n = Scanf.scanf " %d" (+) 0
let xus = Array.init n @@ fun _ -> Scanf.scanf " %f %s" @@ fun a b -> a, b
let _ = Array.fold_left (fun s (x, u) -> if u = "JPY" then s +. x else s +. x *. 380000.) 0. xus |> Printf.printf "%.5f\n"