After 5 days, there will be 2.5 g remaining. Every 5 days we divide by 2. Therefore after 10 days we have 1.25, after 15 we have 0.625, after 20 we have 0.3125 grams. You can do the same thing for 40 days. Heres a formula which is easier to use: A(t) = Ainitial*(1/2)^(t/k), where k is the half life, in this case 5, and t is the duration you are calculating for.