In this section

Historical Rules · 1 June 2020

Rule 609.3

Official source text from the 1 June 2020 Rules release

Permalink

If an effect attempts to do something impossible, it does only as much as possible. Example: If a player is holding only one card, an effect that reads “Discard two cards” causes them to discard only that card. If an effect moves cards out of the library (as opposed to drawing), it moves as many as possible.

Find this number in the current Rules