Marbles prob from code chef.