Calculates correct penalty