O(logN)

i = n
while i > 0:
   k = 2 + 2
   i = i // 2

The value of i is cut in half each time through the loop so it will only take log n iterations.