David said to his men: Whoever will go up first, and remove those images upon which the sign of the covenant of Abraham's oath is written, he shall be the chief. And Joab, the son of Zeruiah, went up, and he became the chief, as it is said, "And Joab the son of Zeruiah went up first, || and was made chief" (1 Chron. 11:6). Afterwards he bought the city of the Jebusites for Israel by a purchase with gold and with a perpetual deed for a perpetual possession. What did David do? He took from each tribe fifty shekels; verily all of them amounted to six hundred shekels, as it is said, "So David gave to Ornan for the place six hundred shekels of gold by weight" (1 Chron. 21:25).
How David Conquered the Jebusites Against All Odds
Pirkei DeRabbi Eliezer 36:20