Making sum depend on valid adoption state.