Two envelopes

You are given two envelopes. Each envelope contains some money. You can pick one envelope, count the money inside it, then either keep this envelope, or return it and keep the other one.

Can you do better than just picking an envelope at random and keeping it? You pick an amount (any amount greater than zero will work). If the envelope you opened contains less than that, you switch.

Source: Wikipedia