Superconducting parity effect across the Anderson limit