composing a given sum