Let's write out in a row the squares and cubes of positive integers: , ....
For the given value of , count the number of written numbers from to . In other words, find the number of such that is a square or a cube of a positive integer (or both a square and a cube simultaneously).
The first line contains the number of test cases .
Each of the next lines contains one positive integer .
For each test print the answer — the number of integers from to that belong to the list.