Similar to Ameba problem ~ interesting math problem