Good sense consists in being able to assess the dangers and choose the lesser of various evils. (21.7)
Machiavelli is sneaky, isn't he? He doesn't say choose the best thing to do. He says choose the lesser of various evils, implying that your choice has got to be kind of evil.