package main
import (
"bufio"
"fmt"
"os"
)
func main() {
in := bufio.NewReaderSize(os.Stdin, 1<<20)
out := bufio.NewWriterSize(os.Stdout, 1<<20)
defer out.Flush()
var t int
fmt.Fscan(in, &t)
const INF int64 = 1e18
var costs []int64
cur := int64(1)
for cur <= INF {
costs = append(costs, cur)
if cur > (INF-1)/2 {
break
}
cur = cur*2 + 1
}
for ; t > 0; t-- {
var x int64
fmt.Fscan(in, &x)
ans := 0
for _, c := range costs {
if x < c {
break
}
x -= c
ans++
}
fmt.Fprintln(out, ans)
}
}