List all perfect squares and perfect cubes of positive integers in a sequence: 1, 4, 8, 9, ....
For a given value , determine how many numbers from to appear in this list.
In other words, find how many numbers satisfy the condition that is either a square or a cube of a positive integer (including those that are both square and cube at the same time).
The first line contains the number of test cases .
Each of the following lines contains a single positive integer n~(1 \le n \le 10^9).
For each test case, print on a separate line the number of integers from to that are perfect squares or perfect cubes of positive integers.
Example 1