Sounds like the parable of the Pharisee and the Publican.
But he never tells us what his excuse for being stupid is.