Let totali be the number of total infected people till the ith day.
So, the number of new infected people on (i+1)th day newi+1 = totali × 2 and total number of infected people till (i+1)th day is totali + newi+1.
Totali and newi become large with increasing N.
So, the calculation may not fit into 32-bit integer calculation.