A controlled M/G/1 type queueing system with a setup time of the service distribution is considered. At first, customers are served by a regular service time. When the number of customers in the system exceeds m, the service time is switched to a high service time with a setup time. High speed services continue until the end of the busy period. The authors propose a simple algorithm for the calculation of the mean number of customers in the system by using a normalizing condition and a boundary condition. Moreover, explicit formulas of the probability mass function are derived when the regular service distribution is exponential or constant.