Derivation of Gain in a Hierarchical Multiple-Goal Pursuit Model