Today Colin and Eva learned what is exploitation in the course 'Basic Principles of Marxism'. At night, Colin had a dream where he was a poor worker, cruelly exploited by capitalist Eva without realizing it at all...
Assuming you are an evil capitalist with

exploited workers under your command, numbered from

to

. The current salary of worker with number

is

yuan. Under your strict supervision, workers cannot tell each other their salaries. You thought the good days would continue like this, but the workers increasingly felt exploited, so they decided to strike and protest against you!
Without the labor of workers, there wouldn't be a luxurious life for you. So you decide to raise their salaries in an appropriate way to stop them from protesting. At first, every worker is unsatisfied. You need to organize several two-person chats to make everyone satisfied, or only one person unsatisfied - at this point, there will be nobody who wants to protest against you with him.
To organize a two-person chat, you need to choose two
unsatisfied workers

, then allow them to tell each other their salaries without penalty temporarily:
-
if
(which means they have the same salary), both of the two workers will feel that they have not been mistreated and both will become satisfied .
-
if
, then worker
will become satisfied. However, worker
will realize that he has been treated differently, so you need to increase his salary to
(which means you have to pay him
yuan, then let
), and worker
still remains unsatisfied.
-
Similarly, If
then worker
will become satisfied. However you have to pay worker
yuan, then let
, and worker
still remains unsatisfied .
But as an evil capitalist, you want to know at least how much money you need to pay them to achieve your goal.