Algebraic numbers close to both 0 and 1