https://medium.com/@renanschmitt/when-will-i-be-a-millionaire-program-that-can-calculate-it-using-two-phase-binary-algorithm-ad2f45f74c16