Edward loves play games. He is play the game Minecraft recently. In this game, his goal is only one ---- survival.
For surviving, Edward built a cattle pen to raise cattles.
Edward need know how many cattles he has so that he can plan manage his foods. He find that two cattles will born a calve one day in the game. And all the cattles are same, which means we needn't to think about the cattle is male or female. If there are two cattles, they will born a calve. Pay attention that the calve needs D days to be grown-up.
But Edward is so busy. He has no time to caculate the answer. So he ask your help.
He know N cattles he keep in the cattle pen, D days the calve grow up need. He want to know how many cattles he has after X days.