1Adapted from web page “Solution to the Millionaire’s Problem”.