Text this: Allocating the Sample Size in Phase II and III Trials to Optimize Success Probability