Bessie is running a race of length meters. She starts at a speed of meters per second. During each second, she can either increase her speed by meter per second, keep it unchanged, or decrease it by meter per second. For example, during the first second, she can increase her speed to meter per second and travel meter, or keep her speed at meters per second and travel meters. Bessie's speed can never become negative.
Bessie always runs toward the finish line, and she wants to finish after an integer number of seconds. At that integer point in time, she must have traveled at least meters. Furthermore, she does not want to be traveling too quickly when she finishes: at the exact moment when Bessie reaches or passes the -meter mark, her current speed must be at most meters per second.
Bessie wants to know the minimum amount of time needed to finish the race for different values of .
The first line contains two integers and n~(1 \le k \le 10^9, 1 \le n \le 1000).
The next lines each contain one integer x~(1 \le x \le 10^5).
Print lines. Each line should contain a single integer: the minimum number of seconds Bessie needs to travel at least meters and finish with a speed of at most meters per second.
When x = 1, one optimal solution is:
Increase the speed to m/s and travel meter.
Increase the speed to m/s and travel meters in total.
Keep the speed at m/s and travel meters in total.
Keep the speed at m/s and travel meters in total.
Keep the speed at m/s and travel meters in total.
Decrease the speed to m/s and travel meters in total.
When x = 3, one optimal solution is:
Increase the speed to m/s and travel meter.
Increase the speed to m/s and travel meters in total.
Increase the speed to m/s and travel meters in total.
Keep the speed at m/s and travel meters in total.
Keep the speed at m/s; the race ends at meters with a speed of m/s.
Note that the following is illegal when x = 3:
Increase the speed to m/s and travel meter.
Increase the speed to m/s and travel meters in total.
Increase the speed to m/s and travel meters in total.
Increase the speed to m/s and travel meters in total.
This is because, at the exact moment Bessie reaches meters, her speed is m/s, which exceeds the allowed maximum speed of m/s.
Example 1