def digits_to_skip(distinct_letter_pairs: int) -> int:
    """The number of letters which can be skipped (i.e. not being incremented
    one by one) depending on the number of distinct letter pairs present."""
    if distinct_letter_pairs == 0:
        # If no letter pair exists already, we know at least one must be
        # among the last two digits. Hence we can set those to 0 and continue
        # from there.
        return 2
    # No optimization possible, have to start at the end.
    return 0