You see an abstract problem on Codeforces.
Given an integer you want to change into that number using a minimal number of the following operations:
- Multiply by
You think it is too easy, so you increase to , and decide that you should answer of these queries per test case.
The first line of input will contain .
The next lines of input will each contain .
For each , output on separate lines the minimal number of operations necessary to change into .
2 32 15