A shopkeeper sells half of the grains plus \(3 \, \text{kg}\) of grains to Customer 1, and then sells another half of the remaining grains plus \(3 \, \text{kg}\) to Customer 2. When the 3rd customer arrives, there are no grains left. Find the total grains that were initially present.