Fibonacci Chicken

Given N, split it into Fibonacci-derived (people, chicken) pairs whose people counts sum to N, and report the minimum and maximum total chickens.

Medium5Dynamic programmingMathGreedyCombinatoricsInterviewNo attempts yetTime limit1sMemory limit128 MB

Problem

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.

  1. 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.
  2. Choose sets so that their people counts add up to exactly NN. The same set can be chosen more than once.
  3. 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 NN people, because the same NN splits into sets in different ways. For N=6N = 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 NN, find the smallest and the largest number of chickens that can be delivered.

Input

The first line contains the number of people NN. (2N100002 \le N \le 10000)

Output

Print the smallest and the largest number of delivered chickens on one line, separated by a space.