A safe uses a 4-digit code, from 0000 to 9999. You can type an arbitrarily long sequence of digits.
The box opens as soon as the last four digits typed match the code, even if you don't know when this will happen. What is the minimum length of a sequence that guarantees opening the box?