This paper deals with the machine repair problem consisting of M operating machines with S spare machines, and R repairmen where machines have two failure modes under steady-state conditions. Spares are considered to be either cold-standby, warm-standby or hot-standby. The two failure models have equal probability of repair. Failure time of the machines and repair time of the repairmen are assumed to follow a negative exponential distribution. A cost model is developed in order to determine the optimal values of the number of repairmen and the number of spares simultaneously, while maintaining a minimum specified level of system availability. Numerical results are presented in which several system characteristics are evaluated for three types of standby under optimal operating conditions.