Multiple resources and the optimal balance between size and number of offspring