n = 0 u = 7 while u < 10**5: n = n + 1 u = 2*u + 2*n + 1 print(n)