Олимпиадный тренинг

Задача 27072. MARS COLONIZATION


Задача

Темы:
Scientists managed to send a mini-factory to the planet Mars, which can produce a mini-factory or a drone for collecting water in one day (a mini-factory or a drone for collecting water can only start working from the next day). The drone collects one unit of water per day. Determine the minimum number of days needed to collect at least N units of water.

Input data format
A single number N is given ( 1<= N <= 109 ) – the required amount of water.

Output data format
One integer M – the minimum number of days required.

Enter Output
2 3


Remark
One of the correct sequences of actions looks like this:
? On the first day, the mini-factory produces a drone to collect water;
? On the second day, the mini-factory produces another drone, and the first drone collects one unit of water;
? On the third day, the mini-factory can produce one more drone or a mini-factory, while the first drone collects one more unit of water (it collected 2 units of water in total), and the second drone collects a unit of water. Thus, 3 units of water have been accumulated in three days.

Another sequence of actions is to build another mini-factory on the first day, and on the second day to produce two drones, which will collect 2 units of water on the third day.