Frog jumps 3 m high and falls back 2 m. How many jumps does it come out of well.if frog is inside the 40m deep well

In effect for each jump , he gains 1 foot.

after 1 jump, he is 39 feet from the top
after 2 jumps he is 38 feet from the top
...
after 10 jumps he is 30 feet from the top
....
after 37 jumps he is 3 feet from the top

So on the 38th jump he is at the top, and we will assume he does not fall back

I takes him 38 jumps