Rosetta Problems

Frog and Tadpole

https://atcoder.jp/contests/tkppc6-1/tasks/tkppc6_1_f