Solve SICP example 1.19.