A scientist, E. Collie, is starting a series of experiments with bacteria. She has one bacterium right now. This species doubles in number every hour, so one hour later there are 2 bacteria.
E. Collie runs one experiment every hour for n consecutive hours. She starts the first experiment exactly one hour after the first bacterium starts growing. Experiment i needs bi bacteria. In other words, every hour the colony doubles first, and then that hour's experiment takes the bacteria it needs.
How many bacteria are left directly after the last experiment starts? If at any point there are not enough bacteria for an experiment, print error instead.
The answer can be very large, so print it modulo 109+7.