Koopmans' theorem for inner-shell ionization