When resisting temptation is costly