A and B jointly bought n basketballs, each of which costs n yuan. When paying, A pays 10 yuan and then B in turn, and when the final amount to be paid is less than 10 yuan, it is B's turn to pay. After paying the full amount, in order to make the two people pay the same amount, how much should B give to A.
甲、乙两人合买了n个篮球，每个篮球n元．付钱时，甲先乙后，10元，10元地轮流付钱，当最后要付的钱不足10元时，轮到乙付．付完全款后，为了使两人所付的钱数同样多，则乙应给甲多少元．
<gadget id="calculator">10 - 6</gadget>
<output>4</output>

<gadget id="calculator">4 / 2</gadget>
<output>2</output>

<result>2</result>