Solve problem 125 using Rust.