Deuteronomy 25
2 Ref And if the wrongdoer is to undergo punishment by whipping, the judge will give orders for him to go down on his face and be whipped before him, the number of the blows being in relation to his crime.
3 Ref He may be given forty blows, not more; for if more are given, your brother may be shamed before you.