Rosetta Problems

Picking apples

https://marisaoj.com/problem/277