XPS study of the dependence on stoichiometry and interaction with water of copper and oxygen valence states in the YBa2Cu3O7−x compound