But an alternative is to just do a recalculation based on smaller number of engineers.
Yeah, well, that's natural. If you perform const / X, result becomes less and less different from last as you increase X.
Let's consider 1 Workshop, 1 Living Quarters, and 50 Engineers. 46 Engineers could work on scanners at the same time. That gives you 33,120 Engineer hours per month. At 220 hours per scanner, this group would make 150 scanners every month. That costs $34,000 * 150 or $5,100,000 for supplies plus $1,250,000 for engineer salaries, plus $45,000 maintenance on the Workshop and Living Quarters, or $6,395,000. Dividing that by 150 means it costs you an average of $42,633 to make a Motion Scanner. This isn't a whole lot larger than the earlier calculation. There is, of course, some loss due to math issues, but less than when having 196 engineers working. (After the 5th hour, 230 engineer hours were used, and 10 of those were wasted.)
would make 150 scanners every month
Your calculations are not done properly. If you want to account for wasted hours, you are going to do this:
Product_made = max(floor(720 / (ceil(man_hours/engineers_assigned))), 1)
Floor - rounding to zero (5.4 ==> 5)
Ceil - rounding to one (5.1 ==> 6)
Max - maximum, duh. (0.5, 1 ==> 1)
720 - amount of hours in an average month (24 * 30). It's 744 in case of 31 day month.