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