#K80797. Bacteria Growth Simulation
Bacteria Growth Simulation
Bacteria Growth Simulation
You are given a non-negative integer n representing the number of generations. A single bacterium starts reproducing from generation 0, and with each new generation, every existing bacterium splits into two. The total number of bacteria at generation n is given by the formula:
$$2^{(n+1)} - 1$$
Your task is to compute and output the total number of bacteria after n generations.
inputFormat
Input consists of a single integer n (0 ≤ n), representing the number of generations.
outputFormat
Output the total number of bacteria after n generations.## sample
0
1