This paper studies the machine-repair problem consisting of M operating machines with S spares, and R servers which themselves are subject to breakdown under steady-state conditions. Spares are considered to be either cold-standby, or warm-standby or hot-standby. Failure and service times of the machines, and breakdown and repair times of the servers, are assumed to follow a negative exponential distribution. Each server is subject to breakdown even if no failed machines are in the system. A profit model is developed in order to determine the optimal values of the number of servers and spares. Numerical results are provided in which several system characteristics are evaluated for all cases under the optimal operating conditions.