SPOJ - Counting Rabbits