You went to buy rice from a shop. When the shopkeeper was weighing the rice, he balanced the rice bag with 5 kg, 500 gm, 250 gm and 100 gm weights. What is the weight of rice (in kg) you bought?