I don't know much about HP (NYSE: HPQ), save for the fact that my ink cartridges go empty far too quickly. I do, however, have a pretty firm grasp of third-grade arithmetic, and running a few basic numbers convinces me that HP's decision to oust then-CEO Mark Hurd was patently ridiculous.

You already know most of the story: Hurd is accused of falsifying less than $20,000 of expenses over two years. That this was ethically shady is obvious. And as my colleague Tim Beyers rightly notes, Hurd "approved payments for reasons having nothing to do with creating value for shareholder. Do business offenses get any more serious than that? I can't see how."

No arguments there. But even more appalling is that canning Hurd triggered a $35 million severance package. So to be sure, the total financial cost of this debacle looks likes this:

$35 million + < $20,000  = $35.02 million

Now, which side of that equation did more to rob shareholders of their value? Hurd's petty expenses, or the HP board's decision to show him the door with a sum of money equal to more than double the gross domestic product of the nation of Tuvalu?

Last year, Bank of America (NYSE: BAC) shareholders faced a similar logical snafu when the bank was up against $33 million in penalties stemming from management's abuse of shareholders. As the judge handling the case (who threw the charges out) said of the penalty:

It does not comport with the most elementary notions of justice and morality, in that it proposes that the shareholders who were the victims of the bank's alleged misconduct now pay the penalty for that misconduct.

I suppose there's an argument to make that canning ethically challenged executives is about teaching lessons and sending signals. I just wish HP's board would be upfront and tell shareholders that spending $35 million of their money to teach Hurd a lesson was an appropriate use of capital that will add shareholder value. I think the absurdity in that speaks for itself.

Fool contributor Morgan Housel doesn't own shares in any of the companies mentioned in this article. The Fool has a disclosure policy.