Crazy Hard Math Problem