Java program that solves for the time when a frog can get across a river.