Most of the delivery food around KAIST is chicken. The market was already crowded, but Jihoon opened one more chicken shop near campus, and it did better than he expected.
The trick is in how an order works. Jihoon's shop sells a single item, the goblin oven roast, so a customer only says how many people will eat and the shop delivers chicken for exactly that many people.
The shop decides the number of chickens like this.
- Take two neighboring numbers of the Fibonacci sequence and build a set from them: 1 chicken for 2 people, 2 chickens for 3 people, 3 chickens for 5 people, 5 chickens for 8 people, 8 chickens for 13 people, and so on. The number of people is always larger than the number of chickens.
- Choose sets so that their people counts add up to exactly N. The same set can be chosen more than once.
- Deliver every set chosen in step 2.
Taeyoung, a regular customer, wants to know how far the delivered count can move for an order of N people, because the same N splits into sets in different ways. For N=6 he can take three sets of 1 chicken for 2 people and receive 3 chickens, or two sets of 2 chickens for 3 people and receive 4 chickens.
Given N, find the smallest and the largest number of chickens that can be delivered.