Charge parity in Josephson tunneling through a superconducting grain